creating socket()


 
Thread Tools Search this Thread
Top Forums Programming creating socket()
# 8  
Old 06-11-2010
Thanks Jim, other query is what do we have to correct if socket connection results
"connection refused" though the server is online

---------- Post updated 06-11-10 at 12:25 AM ---------- Previous update was 06-10-10 at 11:38 PM ----------

what would need to correct if connect() call results in "connection refused" thought the server is online
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Homework & Coursework Questions

Creating a .profile, displaying system variables, and creating an alias

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Here is what I am supposed to do, word for word from my assignment page: 1. Create/modify and print a... (2 Replies)
Discussion started by: Jagst3r21
2 Replies

2. IP Networking

Clarification - Setting socket options at the same time when socket is listening

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

3. Programming

Error with socket operation on non-socket

Dear Experts, i am compiling my code in suse 4.1 which is compiling fine, but at runtime it is showing me for socket programming error no 88 as i searched in errno.h it is telling me socket operation on non socket, what is the meaning of this , how to deal with this error , please... (1 Reply)
Discussion started by: vin_pll
1 Replies

4. Programming

socket function to read a webpage (socket.h)

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. Shell Programming and Scripting

help needed with creating challenging bash script with creating directories

Hi, Can someone help me with creating a bash shell script. I need to create a script that gets a positive number n as an argument. The script must create n directories in the current directory with names like map_1, map_2 etcetera. Each directory must be contained within its predecessor. So... (7 Replies)
Discussion started by: I-1
7 Replies

6. UNIX for Advanced & Expert Users

Why root permissions required for creating of RAW Socket

To create RAW socket in Unix/Linux why should one have root permissions? Any other work around to create raw sockets in Unix/Linux using a normal login id? Since I don't have super user credentials and I want to create RAW sockets. Let me know if you are aware of any work around. (3 Replies)
Discussion started by: anilgurwara
3 Replies

7. Programming

which socket should socket option on be set

Hi all, On the server side, one socket is used for listening, the others are used for communicating with the client. My question is: if i want to set option for socket, which socket should be set on? If either can be set, what's the different? Again, what's the different if set option... (1 Reply)
Discussion started by: blademan100
1 Replies

8. 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

9. Programming

Socket Programming socket

Hello, I actually try to make client-server program. I'm using SCO OpenServer Release 5.0.0 and when I try to compile my code (by TELNET) I've got this error : I'm just using this simple code : and I get the same error if I use : If someone can help me, Thanks (2 Replies)
Discussion started by: soshell
2 Replies

10. Programming

How to use the socket

I must write some codes about client/server architecture. The server program send the data to the client program,And the data is huge count and I want to implement that If some error happen and traslation of the data is interrupted,The program can send the data to the client program from the pos... (1 Reply)
Discussion started by: niuzefeng
1 Replies
Login or Register to Ask a Question
SOCKET_CREATE_LISTEN(3) 						 1						   SOCKET_CREATE_LISTEN(3)

socket_create_listen - Opens a socket on port to accept connections

SYNOPSIS
resource socket_create_listen (int $port, [int $backlog = 128]) DESCRIPTION
socket_create_listen(3) creates a new socket resource of type AF_INET listening on all local interfaces on the given port waiting for new connections. This function is meant to ease the task of creating a new socket which only listens to accept new connections. PARAMETERS
o $port - The port on which to listen on all interfaces. o $backlog - The $backlog parameter defines the maximum length the queue of pending connections may grow to. SOMAXCONN may be passed as $backlog parameter, see socket_listen(3) for more information. RETURN VALUES
socket_create_listen(3) returns a new socket resource on success or FALSE on error. The error code can be retrieved with socket_last_error(3). This code may be passed to socket_strerror(3) to get a textual explanation of the error. NOTES
Note If you want to create a socket which only listens on a certain interface you need to use socket_create(3), socket_bind(3) and socket_listen(3). SEE ALSO
socket_create(3), socket_create_pair(3), socket_bind(3), socket_listen(3), socket_last_error(3), socket_strerror(3). PHP Documentation Group SOCKET_CREATE_LISTEN(3)