Unity client server is not connected while using sendbychannel - unity3d

while running the unity game engine as client and server in one machine, working perfectly fine just initially its giving error,
NetworkClient SendByChannel when not connected to a server
UnityEngine.Networking.NetworkClient:SendByChannel(Int16, MessageBase, Int32)
playerController:Update()
Can anyone please tell me why this error is coming?
Here the client is sending his position and server renders the texture and sends it back to him. But when the client is running on the Android (mobile) and server on the desktop, every time I am getting
NetworkClient SendByChannel when not connected to a server.
I can't set the connection between server and client.
Can anyone please tell me why the connection is not getting set up?
The channel ID is same and everything I checked (IP and port no about firewall). Nothing list above is a problem.

Related

Connecting to Openfire using Icelink

I’m trying to build a voip app with openfire on server-side, Icelink on client-side in xamarin android.
The problem is the openfire client(running on port 5222) does not respond at all even from the local host.
For example when i try 192.168.1.xx:5222 in my browser, it is always in acquire stat and does not response anything.
I have checked all the primitive things and tested the server with Spark and it works fine!

Connect to C++ REST sdk SERVER on Windows from LAN

I have a server written on C++ REST SDK.
There's http_listener which listens to "http://localhost:34568".
When I try to send a request in browser or from the client to localhost it works fine and I get the responses from my server. But the point is to use the application in network. And here where the problem comes.
When I try to request the server from the other PC using IP(192.168.1.103:34568) I get "HTTP Error 400. The request hostname is invalid."
I'm aware that that could be some firewall issues but it's turned off. Also I tried to set port rules in brandmauer and it didn't help.
And even more! I got XAMPP running Apache server and when I do the same thing but with (192.168.1.103:80) I do get the response from Apache and have an access.
Anybody had something similar or somebody knows what the problem is about?
Listen to local ip address or to your network name (dns):
"http://xxx.xxx.xxx.xxx:34568" or
"http://your_network_name:34568"
So, if you have multiple network adapters, you can choose which one.

Cannot register my Android sip app to Fritzbox

I am using ZyXel reach as Android application and want to connect it to my Fritz!Box.
Before I used CSIP simple, but it uses too much resources from the phone, so I switched to ZyXel reach.
The log file of ZyXel reach shows 403 Forbidden SIP Server.
It does not matter if I try to connect from outside and a stunt server or if I try to connect within the network (Wifi), I get the same result.

My netty TCP/IP server stops listenning few hours after starting

I have written TCP/IP server using Netty4.0 running on a Linux machine listening to small GPS tracking devices. I have been facing weird problem, which is server stops listening to them in a sudden several hours after I starts it. There is any error log I can see and still server is running. It looks like only channel is not working. When I run a client to do health check, the client socket is still alive and keep sending packet to the server but server does not get it.
If you have any idea how to solve it, please tell me about it. It would be appreciated.
It is impossible to tell without more informations. I would check different things like if there was an OOM exception or with telnet if the server really refuse connections etc. Also jstack may show you if there is some deadlock etc.

What's Difference Between Ubuntu Server (32bit) and Desktop (32bit) In Socket Programming

I am working on a server/client based project. I almost finished my server side code.
I develop the server app in EclipseCDT on Ubuntu Desktop, and everything just works fine.
But when deploy my app to a Ubuntu Server (I tried Server 10.04/10.10), the server app can start normally (waiting for connection), but the same client just cannot connect to the server.
I use Socket for receiving and sending data to/from the client.
Peter
P.S.: if I install sudo apt-get install ubuntu-desktop on my server machine, then everything works fine again.
===========================================================================
New Findings from the source code:
LabelStartBlocking:
int newScoketId = ::accept(socketId, 0, 0); // socketId == 3 ::accept is define in socket.h
// waiting for connection
LabelResume: // if new connection coming
// Do something with newSocketId
The behavior difference between Ubuntu Desktop and Server is:
On Ubuntu Desktop version, when the server starts, it is blocked at LabelStartBlocking with the socket routine ::accept; and then if a new connection arrives, the server will resume at LabelResume and create a new socket connection using the return value newSocketId;
However, on Ubuntu Server version, when the server starts, it is also blocked at LabelStartBlocking with the socket routine ::accept, but if a new connection arrives, the server won't resume at LabelResume, and the new socket connection CANNOT be created.
Can you guys help me out?
Peter
Thanks for your attention.
I finally figured it out.
If there are more than one IP addresses for the same hostname (/etc/hosts), the old code will fail.
Example /etc/hosts file:
127.0.0.1 localhost YourHostName
10.50.10.251 YourHostName
I traced the calling stack, and I found that, the IP address (10.50.10.251) passed to the program is translated into hostname, and then later the hostname is translated back to IP address (for binding), but a DIFFERENT one, that's why my server program cannot accept any client connection.
Hope it helps if any others have the similar issue.
Peter