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.
 
Back
Top