04-13-2007
Opening a TCPIP Port with UNIX C
i am new to UNIX and C (primarilly a JDE and AS400/RPG developer). However,
I need to find a way to send data to and from a web service from within a UNIX C program.
What i would like to be able to do is to receive in a block of XML (from a non C application), wrap it, and then open a TCPIP port on the server to communicate with the web service. I would then send the XML block to the web service and then recieve a message back to confirm the data was received.
I have 2 questions:
1. is there a way to open a TCPIP port in UNIX C? if so could you point me in the right direction of how to do this?
2. has anyone done anything like the process I describe above before?
Many thanks for your help on this.
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
My mail went down and the company told me to open port 110 on my server. How do I do this? (2 Replies)
Discussion started by: djatwork
2 Replies
2. UNIX for Dummies Questions & Answers
i need to open port 1470. how do i do this. whats the command. This is on a solaris box.
Thanks (1 Reply)
Discussion started by: ollyparkhouse
1 Replies
3. UNIX for Dummies Questions & Answers
I've got openssh installed but when i try to ssh to my machine i get a "port 22: connection refused" message.
Do I need to add something to the hosts.allow file to allow ssh access in?
I'm running Mandrake 8.1 (5 Replies)
Discussion started by: gasaraki99
5 Replies
4. UNIX for Advanced & Expert Users
How do we install a Printer connected directly to network with a private IP of 192.9.168.109 on a SUN system with IP of 192.9.168.2 so that we can use it with the lp command. The printer is a standard Line Matrix Printer. I would like to know how to add it from COMMANDLINE also.
Thanx (3 Replies)
Discussion started by: /etc/passwd
3 Replies
5. AIX
Hi there,
I have been trying to open port 9998 on an AIX 5.1 box to no avail. This machine is not connected to the internet and I have only been accessing it locally, so I know it's not a network firewall/proxy issue. I have tried editing /etc/services and inetd.conf, refreshing inetd.conf, and... (3 Replies)
Discussion started by: erica057
3 Replies
6. UNIX for Dummies Questions & Answers
7
I need to connect to a Unidata database using rpc on a HPUX 11 unix machine. The rpc software on Unidata uses port 31438 which does not appear to be available. How can I check the status of this port and activate it for tcp use? (0 Replies)
Discussion started by: SkyBlue
0 Replies
7. AIX
HI All,
Does anyone out there know of any good online tutorials for the basics of routing, gateways, networking with AIX, preferably the more recent versions like 5.2/5.3?
Using commands such as netstat, smit mkroute, etc. to connect to boxes on a network, and load software with networked... (1 Reply)
Discussion started by: jeffpas
1 Replies
8. Solaris
Hello all,
I need assistance...
I need to open a port # 36677 and have it remain open even after a power cycle.
I thought all I needed to do was add it to /etc/services. That was not it...
Can someone please tell me how to do this.
Thank you. (6 Replies)
Discussion started by: komputersman
6 Replies
9. AIX
For some reason, my AIX 5.2 box has become slow in accepting telnet requests from others boxes. Windows, times out the connection, whereas, Unix it will wait for the AIX to display the login. I connect and it respawns back and says connected, but then sits and wait for what seems forever to get the... (5 Replies)
Discussion started by: mrmurdock
5 Replies
LEARN ABOUT OSX
io::socket::unix
IO::Socket::UNIX(3pm) Perl Programmers Reference Guide IO::Socket::UNIX(3pm)
NAME
IO::Socket::UNIX - Object interface for AF_UNIX domain sockets
SYNOPSIS
use IO::Socket::UNIX;
DESCRIPTION
"IO::Socket::UNIX" provides an object interface to creating and using sockets in the AF_UNIX domain. It is built upon the IO::Socket
interface and inherits all the methods defined by IO::Socket.
CONSTRUCTOR
new ( [ARGS] )
Creates an "IO::Socket::UNIX" object, which is a reference to a newly created symbol (see the "Symbol" package). "new" optionally takes
arguments, these arguments are in key-value pairs.
In addition to the key-value pairs accepted by IO::Socket, "IO::Socket::UNIX" provides.
Type Type of socket (eg SOCK_STREAM or SOCK_DGRAM)
Local Path to local fifo
Peer Path to peer fifo
Listen Create a listen socket
If the constructor is only passed a single argument, it is assumed to be a "Peer" specification.
NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE
As of VERSION 1.18 all IO::Socket objects have autoflush turned on by default. This was not the case with earlier releases.
NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE
METHODS
hostpath()
Returns the pathname to the fifo at the local end
peerpath()
Returns the pathanme to the fifo at the peer end
SEE ALSO
Socket, IO::Socket
AUTHOR
Graham Barr. Currently maintained by the Perl Porters. Please report all bugs to <perlbug@perl.org>.
COPYRIGHT
Copyright (c) 1996-8 Graham Barr <gbarr@pobox.com>. All rights reserved. This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
perl v5.16.2 2012-10-11 IO::Socket::UNIX(3pm)