Hi guys,
I wanted to ask a thing...
well i use winsock6 in vb6...and i've used getdata,sendtada,connect,listen.ecc....
today i started using vs 2010 and i dont know where to start and what to use to do the same things as in vb6
any tip?
cheers
Printable View
Hi guys,
I wanted to ask a thing...
well i use winsock6 in vb6...and i've used getdata,sendtada,connect,listen.ecc....
today i started using vs 2010 and i dont know where to start and what to use to do the same things as in vb6
any tip?
cheers
Like so many things in VB.NET compared to VB6, network communication is done in a far more object-oriented way. Instead of one "super class" that does everything, there are multiple classes that each have a well-defined purpose, obeying the "single responsibility principle". As a first option, consider using the TcpListener class to accept incoming connections, the TcpClient class to create the connection and the NetworkStream class to perform the actual communication. There's also the Socket class for more fine-grained control. You might like to follow the CodeBank link in my signature and check out my Asynchronous TCP demo, which shows the use of all three to asynchronously communicate between a server and multiple clients.
ok thanks..will check now :)
Hello
I am not 100% new to VB but now i start using VB2010 now
and saw that winsock is not working anymore
basicly I need only to send 6 chars to an extern device
can some help me for this?
reciveing will be only a string.
I can not see the link for the "Asynchronous TCP demo"
That asynchronous TCP thread is probably overkill for what you want. You should probably just use the corresponding synchronous methods, which are simpler. If you look around the web, you should be able to find plenty of examples of using the TcpListener and TcpClient classes.