GXNet.Open() parallel connection are not allowing

5 posts / 0 new
Last post
Goutam
GXNet.Open() parallel connection are not allowing

Hi,

We are getting following exception at the line GXNet.Open() when trying to parallel connect to the different IP and port using Gurux Net. Only two connection are allowing at time but rest of them are throwing following exception.

Error: A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied

Note: Different thread create new instance of media(Gurux.Net) and connect to respective IP and port.

kurumi
kurumi's picture
GXNet.Open() parallel connection are not allowing

Hi,

Server can't handle more than two connections at the same time.

BR,

Mikko

________________________________________
Mikko Kurunsaari
Gurux Ltd
Hermiankatu 6-8 H 33720 TAMPERE, FINLAND
Phone: +358 3 265 1244
Home page: http://www.gurux.org

Goutam
GXNet.Open() parallel connection are not allowing

Hi,

Another third party application, simultaneously connecting to the different IP and ports at the same time.
Now we are implementing Gurux and getting above exception.

So , I think is not the issue of "Server can't handle more than two connections at the same time".

Could you please suggest me any others solution.

Goutam

kurumi
kurumi's picture
GXNet.Open() parallel connection are not allowing

Hi,

Are there multiple connections open at the same time in the other app?
Or, is app reading one meter at the time?

Test this using same server IP and port than the other app.

It might be that server is config differently.

BR,
Mikko

________________________________________
Mikko Kurunsaari
Gurux Ltd
Hermiankatu 6-8 H 33720 TAMPERE, FINLAND
Phone: +358 3 265 1244
Home page: http://www.gurux.org

Goutam
GXNet.Open() parallel connection are not allowing

Hi,

We able to connect to different meters (with different IP & Port ) using system socket class object
using parallel connection at the same time.

But on the other side we are not able to connect to same meter set using GXNet.

GXNet Code
-----------
GXNet media = new GXNet();
media.Protocol = NetworkType.Tcp;
media.HostName ="xxx.xxx.xx.xxx";
media.Port=10001;
media.Open();

Normal System Socket
-----------
System.Net.Sockets.Socket socket=new System.Net.Sockets.Socket(System.Net.Sockets.AddressFamily.InterNetwork, System.Net.Sockets.SocketType.Stream, System.Net.Sockets.ProtocolType.Tcp);
System.Net.IPEndPoint ed = new System.Net.IPEndPoint(System.Net.IPAddress.Parse("xxx.xxx.xx.xxx"), Port);
socket.Connect(ed);

Here I posted code from both approach of mine.
Could you please suggest what is missing in GXNet code.

Goutam