Strophe stream management plugin acknwledgement functionality not working with socket - xmpp

Stream management acknwledgement not working with socket other chat is working fine with socket. Its was working fine with bosh. I just change the connection from bosh to socket.
Here is the line of code change
Socket connection(chat is working fine but Stream management acknwledgement is not working)
$scope.xmppChatObj.connection = new Strophe.Connection("wss://testchatnet-web.ethizo.com:5445/ws/");
Bosh connection (Working fine)
$scope.xmppChatObj.connection = new Strophe.Connection($scope.xmppChatObj.boshServer,{ 'keepalive': true });

Related

How to connect Julia TCP client socket

I am learning Julia networking and trying to connect to a server using the Sockets package. I am unable to get a response from the server. Please see my code below.
I have tried to connect to the server using the following function.
using Sockets
function login()
cs = connect("78.129.190.32", 5201)
write(cs, "text string message")
data = read(cs)
println("Received: $data")
end
however I receive no response from the server. Is this how one would connect using tcp sockets?
I have included the package Sockets and verified in Julia terminal.
The host and port work as I have implemented the socket in c#.

client/server connection timed out

i am having an application running inside a gateway,
this application is a coap-server coded using the libcoap library
the server is running perfectly fine, the ip:port is tested using different commands such as nmap , telnet and others, each time it shows that the port is open and the connection is a success.
My problem is that there's no response from the server, wireshark is showing that the requests are being re-transmitted until timeout.
After some research, i thought that the gateway doesn't support NAT loopback, so i tried sending requests from another connection (i used my phones 4G). I even disabled firewall on the gateway too, But no success either.
UPDATE:
after some digging, i managed to receive a response from the server, but only when using TCP connection, the UDP still sends requests until timeout,
from a logical point of view, what may be the problem here ?
note: UDP is a must in this application so i cant just ignore it.

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!

Client to Web socket server to socket client implementation

I am trying to build a application that be behave as server and client that will be written in go.
as a big picture,
web/php websocket client(java script to websocket access) <-> go server(websocket server & socket client) <-> tcp socket server
For starting, I have implemented go to be a socket client, built protocol layer to communicate properly with my socket server and I have used some web socket library to be a websocket server.
My question is how can I pair each connection in secure way and manage connection without hassle.
I was thinking something like pair data structure to tack.
in go-lang syntax
var track_connection map[wss_connection]socket_connection
// create map data with web socket to be a key and track socket connection
this way i can look up the connection by web socket connection.
I am not sure this is clear enough to be a question
please let me know if any clarification is needed.

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