EDN Admin
Well-known member
<p align=left><font face=Arial size=2></font>
Hello
<p align=left> I am working on network project .......
<p align=left>
<p align=left>I am getting an error <font color="#ff0000 "An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full"</font>
<p align=left> <font color="#ff0000 </font>
<p align=left> <font color="#ff0000 Please see the code below</font>
<p align=left><font color="#000000" size=2></font>
<p align=left> <font color="#ff0000 </font>
<p align=left> <font size=2>
_Objsock = </font><font color="#0000ff" size=2>new</font><font size=2> </font><font color="#008080" size=2>Socket</font><font size=2>(</font><font color="#008080" size=2>AddressFamily</font><font size=2>.InterNetwork,
</font><font color="#008080" size=2>SocketType</font><font size=2>.Dgram, </font><font color="#008080" size=2>ProtocolType</font><font size=2>.Udp);</font>
<p align=left><font size=2>
</font><font color="#008000" size=2>//Assign the any IP of the machine and listen on port number 1000 </font><font size=2>
</font><font color="#008080" size=2>IPEndPoint</font><font size=2> ipEndPoint = </font><font color="#0000ff" size=2>new</font><font size=2> </font><font color="#008080" size=2>IPEndPoint</font><font size=2>(</font><font color="#008080" size=2>IPAddress</font><font size=2>.Any, 5000);
</font><font color="#008080" size=2>EndPoint</font><font size=2> Rep = (</font><font color="#008080" size=2>EndPoint</font><font size=2>)ipEndPoint;</font>
<p align=left><font size=2>
</font><font color="#008000" size=2>//Bind this address to the server </font><font size=2>
_Objsock.Bind(Rep);
<p align=left>
</font><font color="#008080" size=2>IPEndPoint</font><font size=2> ipeSender = </font><font color="#0000ff" size=2>new</font><font size=2> </font><font color="#008080" size=2>IPEndPoint</font><font size=2>(</font><font color="#008080" size=2>IPAddress</font><font size=2>.Any, 0);
</font><font color="#008000" size=2>//The epSender identifies the incoming clients</font>
<p align=left><font color="#008080" size=2>EndPoint</font><font size=2> epSender = (</font><font color="#008080" size=2>EndPoint</font><font size=2>)ipeSender;</font>
<p align=left><font size=2>
</font><font color="#0000ff" size=2>while</font><font size=2> (</font><font color="#0000ff" size=2>true</font><font size=2>)
{
<blockquote dir=ltr style="margin-right:0px
<blockquote dir=ltr style="margin-right:0px
</font><font color="#008000" size=2>//Start receiving data </font><font size=2>
_Objsock.BeginReceiveFrom(data, 0, data.Length,
</font><font color="#008080" size=2>SocketFlags</font><font size=2>.None, </font><font color="#0000ff" size=2>ref</font><font size=2> epSender,
</font><font color="#0000ff" size=2>new</font><font size=2> </font><font color="#008080" size=2>AsyncCallback</font><font size=2>(ReceiveCallback), epSender); </blockquote></blockquote>
} </font>
View the full article
Hello
<p align=left> I am working on network project .......
<p align=left>
<p align=left>I am getting an error <font color="#ff0000 "An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full"</font>
<p align=left> <font color="#ff0000 </font>
<p align=left> <font color="#ff0000 Please see the code below</font>
<p align=left><font color="#000000" size=2></font>
<p align=left> <font color="#ff0000 </font>
<p align=left> <font size=2>
_Objsock = </font><font color="#0000ff" size=2>new</font><font size=2> </font><font color="#008080" size=2>Socket</font><font size=2>(</font><font color="#008080" size=2>AddressFamily</font><font size=2>.InterNetwork,
</font><font color="#008080" size=2>SocketType</font><font size=2>.Dgram, </font><font color="#008080" size=2>ProtocolType</font><font size=2>.Udp);</font>
<p align=left><font size=2>
</font><font color="#008000" size=2>//Assign the any IP of the machine and listen on port number 1000 </font><font size=2>
</font><font color="#008080" size=2>IPEndPoint</font><font size=2> ipEndPoint = </font><font color="#0000ff" size=2>new</font><font size=2> </font><font color="#008080" size=2>IPEndPoint</font><font size=2>(</font><font color="#008080" size=2>IPAddress</font><font size=2>.Any, 5000);
</font><font color="#008080" size=2>EndPoint</font><font size=2> Rep = (</font><font color="#008080" size=2>EndPoint</font><font size=2>)ipEndPoint;</font>
<p align=left><font size=2>
</font><font color="#008000" size=2>//Bind this address to the server </font><font size=2>
_Objsock.Bind(Rep);
<p align=left>
</font><font color="#008080" size=2>IPEndPoint</font><font size=2> ipeSender = </font><font color="#0000ff" size=2>new</font><font size=2> </font><font color="#008080" size=2>IPEndPoint</font><font size=2>(</font><font color="#008080" size=2>IPAddress</font><font size=2>.Any, 0);
</font><font color="#008000" size=2>//The epSender identifies the incoming clients</font>
<p align=left><font color="#008080" size=2>EndPoint</font><font size=2> epSender = (</font><font color="#008080" size=2>EndPoint</font><font size=2>)ipeSender;</font>
<p align=left><font size=2>
</font><font color="#0000ff" size=2>while</font><font size=2> (</font><font color="#0000ff" size=2>true</font><font size=2>)
{
<blockquote dir=ltr style="margin-right:0px
<blockquote dir=ltr style="margin-right:0px
</font><font color="#008000" size=2>//Start receiving data </font><font size=2>
_Objsock.BeginReceiveFrom(data, 0, data.Length,
</font><font color="#008080" size=2>SocketFlags</font><font size=2>.None, </font><font color="#0000ff" size=2>ref</font><font size=2> epSender,
</font><font color="#0000ff" size=2>new</font><font size=2> </font><font color="#008080" size=2>AsyncCallback</font><font size=2>(ReceiveCallback), epSender); </blockquote></blockquote>
} </font>
View the full article