10-29-2007
[QUOTE=porter;302142675]Why not just write a Win32 C++ program using winsock?
If I use winsock, will I be able to run my program on a unix machine?
Conversly, if I use sys/socket.h, will I be able to run my program on a windows machine?
thanks!
10 More Discussions You Might Find Interesting
1. 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
2. UNIX for Advanced & Expert Users
Hi all,
If any of DBA/build experts can help me on solving this issue, it would be of great help:
Recently Oracle was upgraded from 9.2.0.6 to 9.2.0.8 version, after this our C/ProC build is is erroring out by giving the following error :
860:/usr/lib/pa20_64/dld.sl: Unable to find library... (1 Reply)
Discussion started by: shihabvk
1 Replies
3. 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
4. Cybersecurity
Hello all, i need your quick help. I have assignment project class to make a program using pcap library to spoofing DNS in linux environment. Can anyone help me, because i'm newbie in network security and in C?:confused:
Regards,
ptrfw (1 Reply)
Discussion started by: riska_bali
1 Replies
5. IP Networking
I need clarification on whether it is okay to set socket options on a listening socket
simultaneously when it is being used in an accept() call?
Following is the scenario:-
-- Task 1 - is executing in a loop - polling a listen socket, lets call it 'fd', (whose file descriptor is global)... (2 Replies)
Discussion started by: jake24
2 Replies
6. UNIX for Dummies Questions & Answers
Hello,
I am very unfamiliar with linux/unix (don't even know the difference), but am trying to get some linux software to run on my Windows machine for my research. I have the makefiles for the software, and it is designed to be compiled in the PGI complier, which I also have. When i... (6 Replies)
Discussion started by: roba87
6 Replies
7. Shell Programming and Scripting
I'm using cygwin on win7, What I would like to do is something like this:
cygstart cygwin tail -f /foo/test.log | perl -pe 's/error/\e
I know I can start a new instance using either of these:
mintty -e ...
cygstart tail ...
But neither of those open in ANSI mode, so I can't do... (0 Replies)
Discussion started by: Validatorian
0 Replies
8. Programming
I was compiling a downloaded open source pkg. Following the install instruction, I did
$ mkdir build; cd build; cmake ../; make
but got error message:make: *** No rule to make target 'usr/lib64/lib64/libboost_graph-mt.so.5'. needed by ../bin.gam-create. stop
make: *** Error 2
make: *** Error... (1 Reply)
Discussion started by: yifangt
1 Replies
9. AIX
Can somebody help me too identify full path to socket library on AIX? Cannot find anything
Thanks
for contribution (2 Replies)
Discussion started by: digioleg54
2 Replies
10. Programming
I have downloaded and installed a library called htslib for specific bioinformatic use but not for the system (I'm using Ubuntu 18.04). Only parts of the library is needed for my exercise to parse data in a type called VCF format (basically tab-delimited file but contains many information in... (14 Replies)
Discussion started by: yifangt
14 Replies
LEARN ABOUT DEBIAN
socket::getaddrinfo::strict
Socket::GetAddrInfo::Strict(3pm) User Contributed Perl Documentation Socket::GetAddrInfo::Strict(3pm)
NAME
"Socket::GetAddrInfo::Strict" - Provide Socket::GetAddrInfo functions which throw exceptions
SYNOPSIS
use Socket qw( SOCK_STREAM );
use Socket::GetAddrInfo::Strict qw( getaddrinfo getnameinfo );
use IO::Socket;
my $sock;
my %hints = ( socktype => SOCK_STREAM );
my @res = getaddrinfo( "www.google.com", "www", \%hints );
while( my $ai = shift @res ) {
$sock = IO::Socket->new();
$sock->socket( $ai->{family}, $ai->{socktype}, $ai->{protocol} ) or
undef $sock, next;
$sock->connect( $ai->{addr} ) or undef $sock, next;
last;
}
if( $sock ) {
my ( $host, $service ) = getnameinfo( $sock->peername );
print "Connected to $host:$service
";
}
DESCRIPTION
Socket::GetAddrInfo provides the functions of "getaddrinfo" and "getnameinfo", which return lists whose first element is error value, or
false indicating no error occured.
This module wraps the functions provided by "Socket::GetAddrInfo" to check this error value, and throw an exception (using "die") if an
error occured. If not, then the remaining values are returned as normal. This can simplify the logic of a program which otherwise simply
throws its own exception on failure anyway.
FUNCTIONS
@res = getaddrinfo( $host, $service, $hints )
After a successful lookup, returns the list of address structures, as documented in Socket::GetAddrInfo. If the lookup fails, an exception
containing the string form of the error is thrown instead.
( $host, $service ) = getnameinfo( $addr, $flags, $xflags )
After a successful lookup, returns the host and service name, as documented in Socket::GetAddrInfo. If the lookup fails, an exception
containing the string form of the error is thrown instead.
AUTHOR
Paul Evans <leonerd@leonerd.org.uk>
perl v5.14.2 2012-06-08 Socket::GetAddrInfo::Strict(3pm)