i m receiving data on my tcp server.But when i use the below line
server.attach(e.info)
My Gxnet tcp server stops receiving any incoming data in received event.
I need to keep receiving the data and also server.attach(e.info) to download the data.
is there any alternate way to do this=>>server.attach(e.info)
??
It's true that you don't receive events anymore if you use attach. The reason is that attached media owns the connection now, not the server. Attached media can listen to received data and then notify the server if you want that functionality. Somethinf like this:
using (GXNet net = server.attach(e.info))
{
net.onReceived += ...
while(true)
{
Hello
everything is fine, but now i m not getting any data in onclient disconnect event
GXNet net = server.attach(e.info)
i mean to say that the client disconnect is not shown in
net_onclientdisconnect event
That what i am saying.I am not getting any notification in
net.OnDisconnected += ...
whats the problem. I am getting data in receive event but not in disconnection.
Whenever server.attach line is used there is no notification for disconnect.
Is there any other way to do server.attach()
Hello
Have you checked my above problem. Can i do this server.attach() manually because if i use this line i am not getting disconnect notifications.
Also i am not able to disconnect that client ever, the data keeps on coming.
Client is disconnected when you leave this:
using (GXNet net = server.attach(e.info))
{
}
You can call releaseRequest or disconnectRequest close the connection to the meter, but usually, the meter doesn't reply after this before meter makes a new connection.
Hello
Can u tell me to do this server.attach() another way or give me the definition of attach method
because i need to disconnect my client manually whenever i want.
Hi,
Hi,
It's true that you don't receive events anymore if you use attach. The reason is that attached media owns the connection now, not the server. Attached media can listen to received data and then notify the server if you want that functionality. Somethinf like this:
using (GXNet net = server.attach(e.info))
{
net.onReceived += ...
while(true)
{
}
}
BR,
Mikko
Hello
Hello
everything is fine, but now i m not getting any data in onclient disconnect event
GXNet net = server.attach(e.info)
i mean to say that the client disconnect is not shown in
net_onclientdisconnect event
Thank You
Hi,
Hi,
You need to start to listen to it for the new client.
net.OnDisconnected += ...
BR,
Mikko
That what i am saying.I am
That what i am saying.I am not getting any notification in
net.OnDisconnected += ...
whats the problem. I am getting data in receive event but not in disconnection.
Whenever server.attach line is used there is no notification for disconnect.
Is there any other way to do server.attach()
Hello
Hello
Have you checked my above problem. Can i do this server.attach() manually because if i use this line i am not getting disconnect notifications.
Also i am not able to disconnect that client ever, the data keeps on coming.
Hi,
Hi,
Client is disconnected when you leave this:
using (GXNet net = server.attach(e.info))
{
}
You can call releaseRequest or disconnectRequest close the connection to the meter, but usually, the meter doesn't reply after this before meter makes a new connection.
BR,
Mikko
Hello
Hello
Can u tell me to do this server.attach() another way or give me the definition of attach method
because i need to disconnect my client manually whenever i want.
Hi,
Hi,
There is no other way. When you leave server.attach TCP/IP port is closed, but the meter will notes it after TCP/IP inactivity timeout has passed.
BR,
Mikko