Hi,
Lets see, for arguements sake lets just say that I have a server,
which site waiting to receive connections, it then has an array of
sockets that are connected to it.
It's receiving all of this asynchronously. Now, this is my problem, I
have a seperate application that connects to the server and can
disconnect any of the sockets connected to it. But, lets just say I
have one client connected, and then I attempt to disconnect them via
the seperate application. I close the socket, and remove it from the
array on the server, but then the server receives a message from the
client where their socket is equal to null. Does anyone know how this
is possible? 1 1557
When your socket closes, any asynchronous operations that happen are
terminated.
This means the callback you passed to BeginReceive will fire, you'll call
"EndReceive ", and gracefully handle your shutdown conditions from there.
--
Chris Mullins, MCSD.NET, MCPD:Enterprise http://www.coversant.net/blogs/cmullins
"DaTurk" <mm******@hotma il.comwrote in message
news:11******** **************@ c28g2000cwb.goo glegroups.com.. .
Hi,
Lets see, for arguements sake lets just say that I have a server,
which site waiting to receive connections, it then has an array of
sockets that are connected to it.
It's receiving all of this asynchronously. Now, this is my problem, I
have a seperate application that connects to the server and can
disconnect any of the sockets connected to it. But, lets just say I
have one client connected, and then I attempt to disconnect them via
the seperate application. I close the socket, and remove it from the
array on the server, but then the server receives a message from the
client where their socket is equal to null. Does anyone know how this
is possible? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Niels Johansen |
last post by:
Hello,
When using the asynchronous read method in the BufferedStream class, , it seems to me that it blocks like
the normal synchronous read method. Why is it so? Why does the
BufferedStream.BeginRead() not behave similar to the
NetworkStream.BeginRead() ??
The following short program illustrates my problem.:
using System;
|
by: Richard |
last post by:
Hi,
I'm suffering a socket race condition - I think. The code works fine at
full speed on a single CPU machine. However when I run full speed on a 2
Zeon machine the socket drops data on an asynchronous receive. If I slow a
connected client down by step debugging or putting Thread.Sleep() calls
between sends then the code works on the...
|
by: Hiroyuki Tanaka |
last post by:
Dear Readers,
I am trying to learn C# network programming and I have discovered that
Windows TCPIP often joins small packets and send them as one to the
remote server. This appears to be a default behaviour of TCPIP?
I am attempting to send 1000 TCPIP packets to a remote sever with only
a sequence number (and soon a variable length...
|
by: Colin |
last post by:
I'm writing a little console socket server but I'm having some
difficulty. Can I ask your advice - where is the best place to get
some help on that topic? It would be nice if some people who knew what
they were doing could take a look at my code and tell me where and why
I'm going wrong.
Any suggestions of groups or forums?
|
by: Macca |
last post by:
My app has an asynchronous socket server. It will have 20 clients connected
to the server. Each client sends data every 500 millisecondsThe Connections
once established will not be closed unless there is a problem with the
connection.
I need to know which client has sent the incoming data as each client has
its own buffer on my "server"...
| |
by: Arno |
last post by:
Hi,
I've written a class for client-socket connection, but I get a lot of times
the error message "Unable to read data from the transport connection" when
restart reading the stream with socket.BeginRead in the Sub
SocketIncomingMsg. I'm debugging now for weeks, but I can't detect where it's
going wrong.
the part of code where it fails:
|
by: Engineerik |
last post by:
I am trying to create a socket server which will listen for connections from
multiple clients and call subroutines in a Fortran DLL and pass the results
back to the client. The asynchronous socket client and asynchronous socket
server example code provided in the .NET framework developers guide is a
great start but I have not dealt with...
|
by: Pat B |
last post by:
Hi, I'm writing my own implementation of the Gnutella P2P protocol
using C#. I have implemented it using BeginReceive and EndReceive
calls so as not to block when waiting for data from the supernode.
Everything I have written works fine sending and receiving
uncompressed data. But now I want to implement compression using the
deflate...
|
by: Nicolas Le Gland |
last post by:
Hello everyone here.
This is my first post in this newsgroup, I hope I won't be to much
off-topic. Feel free to redirect me to any better group.
I am getting strange timing issues when failing to asynchronously connect
sockets on closed or filtered ports, but I'm quite unsure if this is a PHP
issue or my misunderstanding, as it seems...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |