Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hello all, I'm hoping someone can help newbie me.

 

I have been trying to write a quick VB .NET program to connect to an IRC server, just to see how sockets work. The problem is every time I do a new tcpclient connect I get the following error:

 

An unhandled exception of type 'System.Net.Sockets.SocketException' occurred in system.dll

 

Additional information: An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full

 

---

 

This happens on ANY connect. Here was my simple code:

 

mobjClient = New TcpClient("irc.efnet.nl", 6667)

 

Nothing to hard there. Can anyone tell me why this would happen?

 

Ray

  • 1 month later...
  • *Experts*
Posted

The TcpClient is, in my opinion, a rather sub-par socket implementation. I suggest you look into making your own socket client class by making use of the System.Net.Sockets.Socket class and connecting, sending and recieving data yourself. Also, this way you can implement events, so you don't have to poll the TcpClient in its own thread or anything.

 

I believe there is some sort of example and tutorial in the MSDN.

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