sockets usage

  • Thread starter Thread starter Gita George
  • Start date Start date
G

Gita George

I'm trying to write a program (a pop3 mail checker) and I'm having a
problem.
I'm using the socket control and I've noticed that I do not have any events
!?
How do I use the socket to receive data?
How do I simulate the DataArrival event from Winsock (VB 6.0)?
How can I create and alternate event?

This also is the case for the tcpClient control.
If you have any solution please tell me if they can be applied to the
tcpClient control.

Any input would be apreciated

Thanks in advance ...
 
Gita George said:
I'm trying to write a program (a pop3 mail checker) and I'm having a
problem.
I'm using the socket control and I've noticed that I do not have any events
!?
How do I use the socket to receive data?
How do I simulate the DataArrival event from Winsock (VB 6.0)?
How can I create and alternate event?

This also is the case for the tcpClient control.
If you have any solution please tell me if they can be applied to the
tcpClient control.

Any input would be apreciated

Thanks in advance ...

George,

You'll want to look at the Socket Classes BeginReceive method. You'll also want
to look here for information on socket programming in .NET:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconsockets.asp

This has several sections that explains the usage of both blocking and
non-blocking sockets.

Tom Shelton
 
If there is nothing in the receive buffer, the BeginReceive will trow an
exception.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top