Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hello,

 

I am very new regarding Socket Programming but am intermediate Programmer in Winsock (VB6). Can any one guide me with a simple code showing in socket with sending and receiving just like as done with Winsock control? or may be some tutorials link will also do. i have gone through tutorial section in this forum but couldnt find any. thanks in advance

Posted

Thanks for the reply. but am still looking for the things like

 

winsock.connect ("www.domainname.com")

 

and for sending winsock.send("some datas")

 

and for receiving there is its special event for data receiving of winsock. what about if i want to do the same thing in vb.net using system.net and system.net.socket? i mean how do i receive datas there is not such event fired when datas are received. i can connect and send datas but cant receive datas what server send. how will i come to know some datas are received?

 

thanks

  • 2 months later...
Posted

pass the callback sub to tcpclient.BeginRead after you establish your connection

 

oh and to connect its

 

private socket as new tcpClient("host", port) assuming you have already imported system.net.sockets namespace

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...