Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - How to open socket from command line?: (4 Items)
   
How to open socket from command line?  
My program talks with remote server thru /dev/ser[number here]. Communication path is given as a parameter. Now I want 
to change serial for client socket.

How can I open client socket outside my program and have some path (presumably /dev/socket/...) ready to give to my 
program as a communication stream?

RobertL
Re: How to open socket from command line?  
On Thu, Jul 03, 2008 at 07:55:29AM -0400, bob lipka wrote:
> My program talks with remote server thru /dev/ser[number here]. Communication path is given as a parameter. Now I want
 to change serial for client socket.
> 
> How can I open client socket outside my program and have some path (presumably /dev/socket/...) ready to give to my 
program as a communication stream?

You can't just call open() as about the only thing you'll be
able to do with the fd is fstat() since there's no way to
pass _FTYPE_SOCKET to open().  You'll need to call socket().

-seanb
RE: How to open socket from command line?  
Socket communications are handled through the standard BSD style socket
API which is different from direct communications through a serial
driver.  I'd recommend reading up a bit on basic socket operations.
This code has to be implemented as part of your application.


(For example, take a look at
http://en.wikipedia.org/wiki/Berkeley_sockets)

	Robert.

P.S.  you got post 10000.  That's a milestone of some sort :>.


-----Original Message-----
From: bob lipka [mailto:bobik@os.pl] 
Sent: Thursday, July 03, 2008 7:55 AM
To: general-networking
Subject: How to open socket from command line?

My program talks with remote server thru /dev/ser[number here].
Communication path is given as a parameter. Now I want to change serial
for client socket.

How can I open client socket outside my program and have some path
(presumably /dev/socket/...) ready to give to my program as a
communication stream?

RobertL

_______________________________________________
General
http://community.qnx.com/sf/go/post10000
Re: RE: How to open socket from command line?  
P.S.  you got post 10000.  That's a milestone of some sort :>.

Would QSSL Sales award some nice license numbers for posts 99999, 100000 and 100001 you would see a storm here!

RobertL