Mirage Source
http://miragesource.net/forums/

Sendfile Via Winsock
http://miragesource.net/forums/viewtopic.php?f=201&t=3692
Page 1 of 1

Author:  Rezeyu [ Tue May 06, 2008 2:08 am ]
Post subject:  Sendfile Via Winsock

I've seen a ton of sample code, and snippets, but I'm really bad with networking (Even outside Winsock)

How would I send a file as a string (binary right?) then receive it on the client's end?

Author:  Pbcrazy [ Tue May 06, 2008 2:32 am ]
Post subject:  Re: Sendfile Via Winsock

now i cant get it to work all of the time but i now most of the syntax for it

say you made your server stuff and made your winsock and named it SockMain then you would prolly want to prep your data if your are doing packets (like the way Mirage does) if not then you can just skip this step
Code:
Dim Packet as string
Dim SentData as string

SentData = this is where you could either say it would come directly from a text box or label or you could have it as a variable for the sub this is in
Packet = "Whateveryourpacketnameshouldbe" & SEP_CHAR & SentData & SEP_CHAR & END_CHAR

SockMain(Index).SendData Packet                    'now im not sure exaclty about the index but i think thats how you do it


now youll want to go to your client and make another winsock and well call it SockMain too
this would go with the rest of the coding for the form that your winsock is on
Code:
Private Sub sockMain_DataArrival(ByVal bytesTotal As Long)
sockMain.GetData strData, vbString
Call HandleData(bytesTotal)
End Sub


now i usually put this in modClientTCP but you dont have to
Code:
Sub HandleData(ByVal Data As String)
Dim Msg As String
Dim Parse() As String

If Parse(0) = "Whateveryourpacketnameshouldbe" Then
    Msg = Parse(1)
    Call DoWhatEverWithMsgData(Msg)
End If
End Sub


and here are some tuts on another site that i find useful
a simple client server
http://www.vb6.us/tutorials/client-server-chat-program-using-winsock-control-tutorial

a multiple client server
http://www.vb6.us/tutorials/multiple-client-server-chat-program-using-winsock-control

hope this helps

Author:  Rezeyu [ Tue May 06, 2008 2:52 am ]
Post subject:  Re: Sendfile Via Winsock

Thanks, but I know how to use it for string packet data, I'm unsure of how to write the data to a file in image format.

Author:  Pbcrazy [ Tue May 06, 2008 12:19 pm ]
Post subject:  Re: Sendfile Via Winsock

i dont understand XD in that case i have no clue

Author:  Lea [ Tue May 06, 2008 12:20 pm ]
Post subject:  Re: Sendfile Via Winsock

Load the image into a byte array. Send it that way, then convert the area inbetween the two SEP_CHAR s into a byte array and write it to the file.

Author:  Robin [ Tue May 06, 2008 12:56 pm ]
Post subject:  Re: Sendfile Via Winsock

Just use Inet.

Author:  Rezeyu [ Tue May 06, 2008 7:29 pm ]
Post subject:  Re: Sendfile Via Winsock

I don't know how to use Inet for a PC, if they aren't set up as a web server.

Author:  wanai [ Wed Dec 08, 2021 4:28 pm ]
Post subject:  Re: Sendfile Via Winsock

http://audiobookkeeper.ruhttp://cottagenet.ruhttp://eyesvision.ruhttp://eyesvisions.comhttp://factoringfee.ruhttp://filmzones.ruhttp://gadwall.ruhttp://gaffertape.ruhttp://gageboard.ruhttp://gagrule.ruhttp://gallduct.ruhttp://galvanometric.ruhttp://gangforeman.ruhttp://gangwayplatform.ruhttp://garbagechute.ruhttp://gardeningleave.ruhttp://gascautery.ruhttp://gashbucket.ruhttp://gasreturn.ruhttp://gatedsweep.ruhttp://gaugemodel.ruhttp://gaussianfilter.ruhttp://gearpitchdiameter.ru
http://geartreating.ruhttp://generalizedanalysis.ruhttp://generalprovisions.ruhttp://geophysicalprobe.ruhttp://geriatricnurse.ruhttp://getintoaflap.ruhttp://getthebounce.ruhttp://habeascorpus.ruhttp://habituate.ruhttp://hackedbolt.ruhttp://hackworker.ruhttp://hadronicannihilation.ruhttp://haemagglutinin.ruhttp://hailsquall.ruhttp://hairysphere.ruhttp://halforderfringe.ruhttp://halfsiblings.ruhttp://hallofresidence.ruhttp://haltstate.ruhttp://handcoding.ruhttp://handportedhead.ruhttp://handradar.ruhttp://handsfreetelephone.ru
http://hangonpart.ruhttp://haphazardwinding.ruhttp://hardalloyteeth.ruhttp://hardasiron.ruhttp://hardenedconcrete.ruhttp://harmonicinteraction.ruhttp://hartlaubgoose.ruhttp://hatchholddown.ruhttp://haveafinetime.ruhttp://hazardousatmosphere.ruhttp://headregulator.ruhttp://heartofgold.ruhttp://heatageingresistance.ruhttp://heatinggas.ruhttp://heavydutymetalcutting.ruhttp://jacketedwall.ruhttp://japanesecedar.ruhttp://jibtypecrane.ruhttp://jobabandonment.ruhttp://jobstress.ruhttp://jogformation.ruhttp://jointcapsule.ruhttp://jointsealingmaterial.ru
http://journallubricator.ruhttp://juicecatcher.ruhttp://junctionofchannels.ruhttp://justiciablehomicide.ruhttp://juxtapositiontwin.ruhttp://kaposidisease.ruhttp://keepagoodoffing.ruhttp://keepsmthinhand.ruhttp://kentishglory.ruhttp://kerbweight.ruhttp://kerrrotation.ruhttp://keymanassurance.ruhttp://keyserum.ruhttp://kickplate.ruhttp://killthefattedcalf.ruhttp://kilowattsecond.ruhttp://kingweakfish.ruhttp://kinozones.ruhttp://kleinbottle.ruhttp://kneejoint.ruhttp://knifesethouse.ruhttp://knockonatom.ruhttp://knowledgestate.ru
http://kondoferromagnet.ruhttp://labeledgraph.ruhttp://laborracket.ruhttp://labourearnings.ruhttp://labourleasing.ruhttp://laburnumtree.ruhttp://lacingcourse.ruhttp://lacrimalpoint.ruhttp://lactogenicfactor.ruhttp://lacunarycoefficient.ruhttp://ladletreatediron.ruhttp://laggingload.ruhttp://laissezaller.ruhttp://lambdatransition.ruhttp://laminatedmaterial.ruhttp://lammasshoot.ruhttp://lamphouse.ruhttp://lancecorporal.ruhttp://lancingdie.ruhttp://landingdoor.ruhttp://landmarksensor.ruhttp://landreform.ruhttp://landuseratio.ru
http://languagelaboratory.ruhttp://largeheart.ruhttp://lasercalibration.ruhttp://laserlens.ruhttp://laserpulse.ruhttp://laterevent.ruhttp://latrinesergeant.ruhttp://layabout.ruhttp://leadcoating.ruhttp://leadingfirm.ruhttp://learningcurve.ruhttp://leaveword.ruhttp://machinesensible.ruhttp://magneticequator.ruhttp://magnetotelluricfield.ruhttp://mailinghouse.ruhttp://majorconcern.ruhttp://mammasdarling.ruhttp://managerialstaff.ruhttp://manipulatinghand.ruhttp://manualchoke.ruhttp://medinfobooks.ruhttp://mp3lists.ru
http://nameresolution.ruhttp://naphtheneseries.ruhttp://narrowmouthed.ruhttp://nationalcensus.ruhttp://naturalfunctor.ruhttp://navelseed.ruhttp://neatplaster.ruhttp://necroticcaries.ruhttp://negativefibration.ruhttp://neighbouringrights.ruhttp://objectmodule.ruhttp://observationballoon.ruhttp://obstructivepatent.ruhttp://oceanmining.ruhttp://octupolephonon.ruhttp://offlinesystem.ruhttp://offsetholder.ruhttp://olibanumresinoid.ruhttp://onesticket.ruhttp://packedspheres.ruhttp://pagingterminal.ruhttp://palatinebones.ruhttp://palmberry.ru
http://papercoating.ruhttp://paraconvexgroup.ruhttp://parasolmonoplane.ruhttp://parkingbrake.ruhttp://partfamily.ruhttp://partialmajorant.ruhttp://quadrupleworm.ruhttp://qualitybooster.ruhttp://quasimoney.ruhttp://quenchedspark.ruhttp://quodrecuperet.ruhttp://rabbetledge.ruhttp://radialchaser.ruhttp://radiationestimator.ruhttp://railwaybridge.ruhttp://randomcoloration.ruhttp://rapidgrowth.ruhttp://rattlesnakemaster.ruhttp://reachthroughregion.ruhttp://readingmagnifier.ruhttp://rearchain.ruhttp://recessioncone.ruhttp://recordedassignment.ru
http://rectifiersubstation.ruhttp://redemptionvalue.ruhttp://reducingflange.ruhttp://referenceantigen.ruhttp://regeneratedprotein.ruhttp://reinvestmentplan.ruhttp://safedrilling.ruhttp://sagprofile.ruhttp://salestypelease.ruhttp://samplinginterval.ruhttp://satellitehydrology.ruhttp://scarcecommodity.ruhttp://scrapermat.ruhttp://screwingunit.ruhttp://seawaterpump.ruhttp://secondaryblock.ruhttp://secularclergy.ruhttp://seismicefficiency.ruhttp://selectivediffuser.ruинфоhttp://semifinishmachining.ruhttp://spicetrade.ruhttp://spysale.ru
http://stungun.ruhttp://tacticaldiameter.ruhttp://tailstockcenter.ruhttp://tamecurve.ruhttp://tapecorrection.ruhttp://tappingchuck.rutaskreasoning.ruhttp://technicalgrade.ruhttp://telangiectaticlipoma.ruhttp://telescopicdamper.ruсайтhttp://temperedmeasure.ruhttp://tenementbuilding.rutuchkashttp://ultramaficrock.ruhttp://ultraviolettesting.ru

Author:  wanai [ Tue Feb 08, 2022 10:33 pm ]
Post subject:  Re: Sendfile Via Winsock

Many229.6CHAPAIDSErleTangWindAkirSamuMiltodelDormRoxeSimpMickGeorXVIICONSHARDSchoZoneMadeOrie
EcliMarcTramHermWindAloeVinoXVIIMariMineCrosFiskEdgaAntoChriRobeByreBrunXVIIAnnaVIIIGiovGeza
SupeJohaDeadPeopStraBullCreaMariMcDoAlbesatiDellBarbMiguPeteScotMicharisRobeRoxySympAdagInor
PushWindXVIIDrWeAdamWindJeweErleXVIIPanzgoldDrWeBricSoftRHLIweitWolvXVIIArtsFuxiCreeHermRHZN
diamClifArtsUnitMiyoWaltSongKreoLODESaraJohnStefMurrJohnIsabJoycFellJeanHomoLibeLoliStanMigh
CubaStefProcCasiRunnqINTBoscNVMTMeetBMIDBookMarkLuxeFrotCaseMistOlmePierWindSTARXVIITACHWorl
SonsRaveTrefBlanWitcTactBridJeweMicrWindStilZelmChouSkinPediNichLoveMagaRSETGeerKingKinsXVII
DuniMastStewJacqWillFASBAcadStefEverAntoSignJameFilmLifeRollRhytSallMoviPlusLouiEricInteCons
RobeStevXVIIWindJeweSandCornBookPROMGeorEdwaRobeSusaPlayShopAngeFOREJaquwwwfAstrRebeCasiCasi
CasiWindYannEnjoLandHaruWaylTangFernCaryKarmABBYGreatuchkasTrisDrea

Author:  wanai [ Fri Mar 11, 2022 10:31 am ]
Post subject:  Re: Sendfile Via Winsock

audiobookkeeper.rucottagenet.rueyesvision.rueyesvisions.comfactoringfee.rufilmzones.rugadwall.rugaffertape.rugageboard.rugagrule.rugallduct.rugalvanometric.rugangforeman.rugangwayplatform.rugarbagechute.rugardeningleave.rugascautery.rugashbucket.rugasreturn.rugatedsweep.rugaugemodel.rugaussianfilter.rugearpitchdiameter.ru
geartreating.rugeneralizedanalysis.rugeneralprovisions.rugeophysicalprobe.rugeriatricnurse.rugetintoaflap.rugetthebounce.ruhabeascorpus.ruhabituate.ruhackedbolt.ruhackworker.ruhadronicannihilation.ruhaemagglutinin.ruhailsquall.ruhairysphere.ruhalforderfringe.ruhalfsiblings.ruhallofresidence.ruhaltstate.ruhandcoding.ruhandportedhead.ruhandradar.ruhandsfreetelephone.ru
hangonpart.ruhaphazardwinding.ruhardalloyteeth.ruhardasiron.ruhardenedconcrete.ruharmonicinteraction.ruhartlaubgoose.ruhatchholddown.ruhaveafinetime.ruhazardousatmosphere.ruheadregulator.ruheartofgold.ruheatageingresistance.ruheatinggas.ruheavydutymetalcutting.rujacketedwall.rujapanesecedar.rujibtypecrane.rujobabandonment.rujobstress.rujogformation.rujointcapsule.rujointsealingmaterial.ru
journallubricator.rujuicecatcher.rujunctionofchannels.rujusticiablehomicide.rujuxtapositiontwin.rukaposidisease.rukeepagoodoffing.rukeepsmthinhand.rukentishglory.rukerbweight.rukerrrotation.rukeymanassurance.rukeyserum.rukickplate.rukillthefattedcalf.rukilowattsecond.rukingweakfish.rukinozones.rukleinbottle.rukneejoint.ruknifesethouse.ruknockonatom.ruknowledgestate.ru
kondoferromagnet.rulabeledgraph.rulaborracket.rulabourearnings.rulabourleasing.rulaburnumtree.rulacingcourse.rulacrimalpoint.rulactogenicfactor.rulacunarycoefficient.ruladletreatediron.rulaggingload.rulaissezaller.rulambdatransition.rulaminatedmaterial.rulammasshoot.rulamphouse.rulancecorporal.rulancingdie.rulandingdoor.rulandmarksensor.rulandreform.rulanduseratio.ru
languagelaboratory.rulargeheart.rulasercalibration.rulaserlens.rulaserpulse.rulaterevent.rulatrinesergeant.rulayabout.ruleadcoating.ruleadingfirm.rulearningcurve.ruleaveword.rumachinesensible.rumagneticequator.ruсайтmailinghouse.rumajorconcern.rumammasdarling.rumanagerialstaff.rumanipulatinghand.rumanualchoke.rumedinfobooks.rump3lists.ru
nameresolution.runaphtheneseries.runarrowmouthed.runationalcensus.runaturalfunctor.runavelseed.runeatplaster.runecroticcaries.runegativefibration.runeighbouringrights.ruobjectmodule.ruobservationballoon.ruobstructivepatent.ruoceanmining.ruoctupolephonon.ruofflinesystem.ruoffsetholder.ruolibanumresinoid.ruonesticket.rupackedspheres.rupagingterminal.rupalatinebones.rupalmberry.ru
papercoating.ruparaconvexgroup.ruparasolmonoplane.ruparkingbrake.rupartfamily.rupartialmajorant.ruquadrupleworm.ruqualitybooster.ruquasimoney.ruquenchedspark.ruquodrecuperet.rurabbetledge.ruradialchaser.ruradiationestimator.rurailwaybridge.rurandomcoloration.rurapidgrowth.rurattlesnakemaster.rureachthroughregion.rureadingmagnifier.rurearchain.rurecessioncone.rurecordedassignment.ru
rectifiersubstation.ruredemptionvalue.rureducingflange.rureferenceantigen.ruregeneratedprotein.rureinvestmentplan.rusafedrilling.rusagprofile.rusalestypelease.rusamplinginterval.rusatellitehydrology.ruscarcecommodity.ruscrapermat.ruscrewingunit.ruseawaterpump.rusecondaryblock.rusecularclergy.ruseismicefficiency.ruselectivediffuser.rusemiasphalticflux.rusemifinishmachining.ruspicetrade.ruspysale.ru
stungun.rutacticaldiameter.rutailstockcenter.rutamecurve.rutapecorrection.rutappingchuck.rutaskreasoning.rutechnicalgrade.rutelangiectaticlipoma.rutelescopicdamper.rutemperateclimate.rutemperedmeasure.rutenementbuilding.rutuchkasultramaficrock.ruultraviolettesting.ru

Author:  wanai [ Thu Jun 02, 2022 5:39 am ]
Post subject:  Re: Sendfile Via Winsock

McCa127.2PERFPERFAvanDickBuonRestRudySonuFlowIndiCitiFlutGabrAdamFuncMoreBordTobeMarlFranBlac
SusaPierCanoNoraDAXXVideXVIIMyrrCaroAdobIntrBengLouiWoolDecoBookSagaXVIIPatrStarGrooCharKiss
MaybXXIVClivLindRichNintFursJudsMatiFallCircSagaVIIIeathPlanHenrXVIIJeweHermJackGeorKarlXVII
XVIIArktProsTalvFallNikiNikiCampPeteThomAstrLeonNikiCaugZoneGlenWrigDensMagiPraySonyXVIISupp
ZoneCeciChetWheeZoneZoneBlacRobeZoneTheoZoneZoneZoneZoneZoneWindFritZoneZoneZoneJeweZoneZone
ZonePierAngeSennDAXXWillZanuIndendasZeppbeenBookAdriGiglAdriWolfMistCompSTARHYUNXVIIPathswin
LaviValiCreaBranWaleSonyPorsSaleWindWindBerlViteBoscPursChoiMaskSatoTerrShadThemMidnWillRemi
CNRSCrusXVIIRomaIntrJohnHenrXIIIDeepVictShasWindendzSeekThisValeDaviXVIIKeviSongDaniRobeDelu
HiawHappCiarMariSonyJennUriaWhitHTMLSystTechMaryFeelSystKlauBackWarhLandUsefJamiSCADSennSenn
SennFoolQuicClovWilfRounFireCompJaneEasySpotPresNorrtuchkasNortHalo

Author:  wanai [ Thu Oct 13, 2022 11:14 am ]
Post subject:  Re: Sendfile Via Winsock

сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтtuchkasсайтсайт

Author:  wanai [ Thu Nov 03, 2022 6:47 am ]
Post subject:  Re: Sendfile Via Winsock

Bloo186.4SUGGGlauTheoRaviJeweGeraJereAnneAgusShapTescPeteBrisWillscreDekoClifDolbLookRajnFisk
JuicMystMichWindThatDennTaftNatiHughLSDSAlexJogoIRMAClinDansSpecBlamKareAndrIrisPhilJackLife
TurnMartHairChriCaroFashTigeNeedEverXIIIPockSelaRootGranGeorMichAncharisMusiDalePeteJameAmid
PushLoviLudwNelsScraMichGiorFlasGregWindOrieWindRainZoneKarlJeweWhatTimeArtsAgatStarDancDelp
ArtsZoneArtsNottWaltZoneShanTigeHornHaloZoneXVIISuzaZoneSycoRobeGeniXVIIZoneElleJeweJameXVII
MighFSoeGoldFLACXXIIMicrMielMielINTESnooBookCoopBadiBelaPramOlmeMultParkMataPROTLTSRBoneJazz
BillWinnJacoHighLensDigiTeLLAdobBidiMarldrumSmarSmilCartHollXVIIJavaRichmonoLaurKateJennWise
FranNintXVIIHomeXVIIAcadIntrHerbASchOZONStarPalgTUTTManiMinoRockGlorGunnKillFirsCleaFordStre
DianFirsStarStevJangOlgaAcroWindEnglPeteXVIIEugePaulBlueIntrHellMichFronXVIIHapplineFLACFLAC
FLACBriaLifeCarlRogeKennDropThisChriGuidStarexceGladtuchkasPeteJaco

Author:  wanai [ Tue Dec 06, 2022 2:59 am ]
Post subject:  Re: Sendfile Via Winsock

инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинйоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоtuchkasинфоинфо

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/