Sponsored Content
Full Discussion: Problem Connecting to Socket
Top Forums Programming Problem Connecting to Socket Post 302115864 by Stevhp on Saturday 28th of April 2007 08:11:31 PM
Old 04-28-2007
Reply

I'm using Solaris.
 

10 More Discussions You Might Find Interesting

1. Programming

Socket Problem

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. UNIX for Dummies Questions & Answers

Connecting with X-win problem

Hello all, I am trying to connect to my Solaris 8 system with X-win. However, when i try to connect, a black screen comes up, then closes up immediatley. I have checked /var/dt/Xerrors, and I am getting the folllowing: Warning: Missing charsets in String to FontSet conversion Warning:... (2 Replies)
Discussion started by: dragunu
2 Replies

3. Programming

and again, socket() related problem...

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

4. UNIX for Advanced & Expert Users

connect problem for sctp socket (ipv6 socket) - Runtime fail Invalid Arguments

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

5. Programming

Problem with socket connection

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

6. Programming

Socket++ library problem.

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

7. Programming

Debugging IO::Socket Not Connecting

I'm using perl to connect to a port on a unix box from a windows machine. The unix box is located in a remote office and I'm able to connect just fine from my desktop at work across the network. But if I try to remote to another windows machine at the same location as the unix box and try to... (5 Replies)
Discussion started by: nwboy74
5 Replies

8. UNIX for Dummies Questions & Answers

Problem connecting with Reflection X 14.1

Other people at work are able to connect but I am not. I am not sure if there is a setting that I am missing. Connecting from Win7 to Solaris 10. Connection attempt log: gnome-session Connecting 144.243.90.235 via TELNET Thu Mar 29 15:15:32 2012 login: *** Password: ******* Last login: Thu... (2 Replies)
Discussion started by: SIFT3R
2 Replies

9. IP Networking

Execution Problem with socket

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

10. Shell Programming and Scripting

Problem in connecting to db in a loop

Im trying to run a query in multiple db thro sqlplus in a loop written n shell script. whenevr there is a problem in connecting to db, the shell script abruptly exits. My requirement is , when db connection fails, the script should print the msg and contnue to connect to the next db mentioned in... (10 Replies)
Discussion started by: anijan
10 Replies
FBB::LocalClientSocket(3bobcat) 			     Unix Domain client Socket				   FBB::LocalClientSocket(3bobcat)

NAME
FBB::LocalClientSocket - Client Socket connecting to a Server in the Unix Domain SYNOPSIS
#include <bobcat/localclientsocket> Linking option: -lbobcat DESCRIPTION
An FBB::LocalClientSocket may be constructed to connect to a server process in the Unix Domain. The socket made available by the FBB:Local- ClientSocket may be used to initialize a std::istream and/or std::ostream. The std::istream is used to read information from the server process to which the FBB::LocalClientSocket connects, The std::ostream is used to send information to the server process to which the FBB::LocalClientSocket connects. Since a socket may be considered a file descriptor the avaiable FBB::IFdStream, FBB::IFdStreamBuf, FBB::OFdStream, and FBB::OFdStreamBuf classes may be used profitably here. Note that having available a socket does not mean that this defines the communication protocol. It is (still) the responsibility of the programmer to comply with an existing protocol or to implement a tailor-made protocol. The latter situation implies that the sequence of input- and output operations is defined by the programmer. NAMESPACE
FBB All constructors, members, operators and manipulators, mentioned in this man-page, are defined in the namespace FBB. INHERITS FROM
FBB::LocalSocketBase CONSTRUCTOR
o LocalClientSocket(): This constructor merely creates a FBB::LocalClientSocket object. Before it can be used, its open() member must be called. o LocalClientSocket(std::string const &name): This constructor initializes an FBB::LocalClientSocket object, using the named Unix Domain socket to connect to the server using the named Unix Domain socket. An FBB::Errno is thrown if the socket could not be constructed. The construction of the socket does not mean that a connection has actually been established. In order to connect to the server, the member connect() (see below) should be used. The copy constructor is not available. MEMBER FUNCTION
o int connect(): This member returns a socket that can be used to communicate with the server process. An FBB::Errno exception is thrown if the con- nection could not be established. o open(std::string const &name): This member function prepares the FBB::LocalClientSocket object, constructed earlier using the default constructor, for use. The named Unix Domain socket is used to connect to the server using the named Unix Domain socket. An FBB::Errno is thrown if the socket could not be constructed. The construction of the socket does not mean that a connection has actually been established. In order to connect to the server, the member connect() should be used. EXAMPLE
See also the localserversocket(3bobcat) example. #include <iostream> #include <bobcat/localclientsocket> #include <bobcat/ifdstream> #include <bobcat/ofdstream> using namespace std; using namespace FBB; int main(int argc, char **argv) try { if (argc == 1) { cerr << "Provide filename representing the unix domain socket "; return 1; } LocalClientSocket client(argv[1]); int fd = client.connect(); string line; cout << "Connecting to socket " << fd << endl; IFdStream in(fd); // stream to read from OFdStream out(fd); // stream to write to while (true) { // Ask for a textline, stop if empty / none cout << "? "; if (!getline(cin, line) || line.length() == 0) return 0; cout << "Line read: " << line << endl; // Return the line to the server out << line.c_str() << endl; cout << "wrote line "; // Wait for a reply from the server getline(in, line); cout << "Answer: " << line << endl; } return 0; } catch (Errno const &err) { cerr << err.what() << " " << "Can't connect to " << argv[1] << ", port " << argv[2] << endl; return 1; } FILES
bobcat/localclientsocket - defines the class interface SEE ALSO
bobcat(7), ifdstream(3bobcat), ifdstreambuf(3bobcat), clientsocket(3bobcat), localserversocket(3bobcat), localsocketbase(3bobcat), ofd- stream(3bobcat), ofdstream(3bobcat) BUGS
None Reported. DISTRIBUTION FILES
o bobcat_3.01.00-x.dsc: detached signature; o bobcat_3.01.00-x.tar.gz: source archive; o bobcat_3.01.00-x_i386.changes: change log; o libbobcat1_3.01.00-x_*.deb: debian package holding the libraries; o libbobcat1-dev_3.01.00-x_*.deb: debian package holding the libraries, headers and manual pages; o http://sourceforge.net/projects/bobcat: public archive location; BOBCAT
Bobcat is an acronym of `Brokken's Own Base Classes And Templates'. COPYRIGHT
This is free software, distributed under the terms of the GNU General Public License (GPL). AUTHOR
Frank B. Brokken (f.b.brokken@rug.nl). libbobcat1-dev_3.01.00-x.tar.gz 2005-2012 FBB::LocalClientSocket(3bobcat)
All times are GMT -4. The time now is 11:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy