![]() |
Sendfile Via Winsock - Printable Version +- Mirage Engine (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: General (https://mirage-engine.uk/forums/forumdisplay.php?fid=17) +---- Thread: Sendfile Via Winsock (/showthread.php?tid=1739) |
Sendfile Via Winsock - Rezeyu - 06-05-2008 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? Re: Sendfile Via Winsock - Pbcrazy - 06-05-2008 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 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) now i usually put this in modClientTCP but you dont have to Code: Sub HandleData(ByVal Data As String) 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 Re: Sendfile Via Winsock - Rezeyu - 06-05-2008 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. Re: Sendfile Via Winsock - Pbcrazy - 06-05-2008 i dont understand XD in that case i have no clue Re: Sendfile Via Winsock - Robin - 06-05-2008 Just use Inet. Re: Sendfile Via Winsock - Rezeyu - 06-05-2008 I don't know how to use Inet for a PC, if they aren't set up as a web server. |