04-24-2008
how you are doing exec(). Could post the exec code.
9 More Discussions You Might Find Interesting
1. IP Networking
Hello there
The socket option IP_OPTIONS returns an integer value,
supposed to be the contents of the IP header.
Could you please help me out to interpret those values.
ThankYou. (1 Reply)
Discussion started by: hufs375
1 Replies
2. Programming
Hi,
I have a client-server socket program. It has been working fine for over a year, but recently it started to show strange behavior.:confused:
After the server program runs for a while, it will show in the top command saying it is using lots of CPU, MEM. I assume it means the server code is... (1 Reply)
Discussion started by: natxie
1 Replies
3. 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
4. Programming
Why does this socket function only read the first 1440 chars of the stream. Why not the whole stream ? I checked it with gdm and valgrind and everything seems correct...
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <string.h>
#include... (3 Replies)
Discussion started by: cyler
3 Replies
5. Solaris
Hi everyone,
Question for gurus:
Is there a way for us to determine the options used by a socket?
I basically want to know if SO_KEEPALIVE is enabled on a socket to know if the tcp_keepalive_abort_interval parameter will be used by that connection.
Was I clear enough? :confused:
... (0 Replies)
Discussion started by: plmachiavel
0 Replies
6. UNIX for Dummies Questions & Answers
I have just installed OpenBSD on a 333MHz PPC iMac G3. It has a 6GB HDD that has been partitioned as 1GB MacOS 8.5.1, 3GB MacOS X 10.3.9, 2GB OpenBSD 4.8. I now need to install a bootloader so that my computer can recognize the OpenBSD partition at startup. I have been trying to install... (0 Replies)
Discussion started by: t04st3r
0 Replies
7. Shell Programming and Scripting
I'm trying to write a bash script and call it "compile" such that running it allows me to compile multiple files with the options "-help," "-backup," and "-clean". I've got the code for the options written, i just can't figure out how to read the input string and then translate that into option... (5 Replies)
Discussion started by: travis.batzer
5 Replies
8. 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
9. Programming
Sorry if I posted 2 separate questions.
I'm currently doing socket programming on my current task. As you can see below in the client side. I've tried to do a loop so I will be able to get prompt for input over and over again.
This is the code.
do{
printf("Please your name > ");... (10 Replies)
Discussion started by: aLHaNz
10 Replies
LEARN ABOUT PHP
socket_last_error
SOCKET_LAST_ERROR(3) 1 SOCKET_LAST_ERROR(3)
socket_last_error - Returns the last error on the socket
SYNOPSIS
int socket_last_error ([resource $socket])
DESCRIPTION
If a socket resource is passed to this function, the last error which occurred on this particular socket is returned. If the socket
resource is omitted, the error code of the last failed socket function is returned. The latter is particularly helpful for functions like
socket_create(3) which don't return a socket on failure and socket_select(3) which can fail for reasons not directly tied to a particular
socket. The error code is suitable to be fed to socket_strerror(3) which returns a string describing the given error code.
PARAMETERS
o $socket
- A valid socket resource created with socket_create(3).
RETURN VALUES
This function returns a socket error code.
EXAMPLES
Example #1
socket_last_error(3) example
<?php
$socket = @socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
if ($socket === false) {
$errorcode = socket_last_error();
$errormsg = socket_strerror($errorcode);
die("Couldn't create socket: [$errorcode] $errormsg");
}
?>
NOTES
Note
socket_last_error(3) does not clear the error code, use socket_clear_error(3) for this purpose.
PHP Documentation Group SOCKET_LAST_ERROR(3)