05-20-2008
Can you not use non-blocking reads or select()?
10 More Discussions You Might Find Interesting
1. Programming
Hi all,
I have developed server/client application (using C) and tested it on the same machine .. but when I deploy them on different machines I get connection timeout.
Well .. server machine and client machine exists on different network segments, so there is a linux firewall box to route... (3 Replies)
Discussion started by: Agent007
3 Replies
2. Programming
Can anyone help? I'm trying to write a program which will write to a socket. I can get the server to run, but always get an error when I try to connect.
It gives me an error at the "connect" command.
It's probably a simple error, but I can't seem to find it.
#include <sys/socket.h>... (6 Replies)
Discussion started by: Stevhp
6 Replies
3. Programming
I am trying to read HTTP data from a socket. However, for the final set of data being read using read(), read blocks and the control doesnt come back for further processing. I tried using select, but it didn't work...
Any help would be greatly acknowledged.:) (2 Replies)
Discussion started by: Harish.joshi
2 Replies
4. Programming
Dear All,
I've searched many topics and googled many web-pages, but still I didn't found solution to this problem.
I want to set timeout for connect(). The thing is, that my code works only on BSD, on Linux (tested on SuSE box) it freezes at connect() call :(
bool
SomeFunc(std::string... (1 Reply)
Discussion started by: sggkxv
1 Replies
5. UNIX for Advanced & Expert Users
Hi,
I was porting ipv4 application to ipv6; i was done with TCP transports. Now i am facing problem with SCTp transport at runtime.
To test SCTP transport I am using following server and client socket programs. Server program runs fine, but client program fails giving Invalid Arguments for... (0 Replies)
Discussion started by: chandrutiptur
0 Replies
6. Programming
I have a client /server file operation program.It works properly when i run the client and server program in the same system.but when i try to run the client in one system and server in another system i am getting an error in the cleint machine as "ERROR:Connection refused". Plz help me in this
... (1 Reply)
Discussion started by: vigneshinbox
1 Replies
7. Programming
Hi,
My name is Daniel and I'm spanish, so I'm sorry if you can't undertand something becouse of my low-level english.
Something stranger is happening to me with socket++ library and I don't know how to work on it.
I has a library called commands.so and the sslclient is and object of that... (4 Replies)
Discussion started by: lock.cda
4 Replies
8. UNIX for Advanced & Expert Users
Hi - I am getting the error
`Error reading response length from authentication socket'
when I ssh from my cluster to another cluster, and then back to my cluster. It doesn't seem to affect anything, but it's just annoying that it always pops up and tends to confuse new users of the cluster. I... (1 Reply)
Discussion started by: cpp6f
1 Replies
9. UNIX for Dummies Questions & Answers
Hi Guys,
Can anyone explain to me what might be the possible cause on why I'm getting this error from our client server. Appreciate any input.
Thanks!
Br,
rymnd_12345 (0 Replies)
Discussion started by: rymnd_12345
0 Replies
10. IP Networking
Hi
My socket program is to communicate between the two systems connected with lan. Always i am getting an error saying bind value is -1 or not connected. ..If i run both the server and client programs in the same machine in two diff terminals they are working but they are not working between two... (3 Replies)
Discussion started by: Gurvareddy
3 Replies
LEARN ABOUT DEBIAN
zmq_connect
ZMQ_CONNECT(3) 0MQ Manual ZMQ_CONNECT(3)
NAME
zmq_connect - connect a socket
SYNOPSIS
int zmq_connect (void *socket, const char *endpoint);
DESCRIPTION
The zmq_connect() function shall connect the socket referenced by the socket argument to the endpoint specified by the endpoint argument.
The endpoint argument is a string consisting of two parts as follows: transport://address. The transport part specifies the underlying
transport protocol to use. The meaning of the address part is specific to the underlying transport protocol selected.
The following transports are defined:
inproc
local in-process (inter-thread) communication transport, see zmq_inproc(7)
ipc
local inter-process communication transport, see zmq_ipc(7)
tcp
unicast transport using TCP, see zmq_tcp(7)
pgm, epgm
reliable multicast transport using PGM, see zmq_pgm(7)
With the exception of ZMQ_PAIR sockets, a single socket may be connected to multiple endpoints using zmq_connect(), while simultaneously
accepting incoming connections from multiple endpoints bound to the socket using zmq_bind(). Refer to zmq_socket(3) for a description of
the exact semantics involved when connecting or binding a socket to multiple endpoints.
Note
The connection will not be performed immediately but as needed by 0MQ. Thus a successful invocation of zmq_connect() does not indicate
that a physical connection was or can actually be established.
RETURN VALUE
The zmq_connect() function shall return zero if successful. Otherwise it shall return -1 and set errno to one of the values defined below.
ERRORS
EINVAL
The endpoint supplied is invalid.
EPROTONOSUPPORT
The requested transport protocol is not supported.
ENOCOMPATPROTO
The requested transport protocol is not compatible with the socket type.
ETERM
The 0MQ context associated with the specified socket was terminated.
ENOTSOCK
The provided socket was invalid.
EMTHREAD
No I/O thread is available to accomplish the task.
EXAMPLE
Connecting a subscriber socket to an in-process and a TCP transport.
/* Create a ZMQ_SUB socket */
void *socket = zmq_socket (context, ZMQ_SUB);
assert (socket);
/* Connect it to an in-process transport with the address 'my_publisher' */
int rc = zmq_connect (socket, "inproc://my_publisher");
assert (rc == 0);
/* Connect it to the host server001, port 5555 using a TCP transport */
rc = zmq_connect (socket, "tcp://server001:5555");
assert (rc == 0);
SEE ALSO
zmq_bind(3) zmq_socket(3) zmq(7)
AUTHORS
This manual page was written by the 0MQ community.
0MQ 2.2.0 04/04/2012 ZMQ_CONNECT(3)