Search Results

Search: Posts Made By: abc.working
2,190
Posted By abc.working
Signaling
Can anyone post a simple program for handling signals.
My requirement is like this

A daemon process is running and when it receives a signal like ctrl+a (eg.) then a function in the daemon needs...
4,649
Posted By abc.working
Socket programming:One server two port
I want my server socket to listen on two ports in my machine. How do i achieve it? I will have two clients one connecting to 1 port and another to a different port. So my server needs to listen to...
22,305
Posted By abc.working
s_client = accept(s,(struct sockaddr...
s_client = accept(s,(struct sockaddr *)&cin,&addrlen);

Got the solution:
Actually above line i was executing as

if(s_client=accept(s,(struct sockaddr *)&cin,&addrlen !=-1)

but now i do it...
9,032
Posted By abc.working
socket programming : client server IPC
I'm new to socket programming. Have a basic doubt.
I have a structure(global) at the server side.
I have two different client connecting to the server. Will the changes made by one client on the...
22,305
Posted By abc.working
I run the server code, it waits for a connect. ...
I run the server code, it waits for a connect.
Now i run my client code(client.c):
client localhost

now the server waits till client connects then it exits with recv() returning a -1.
client...
22,305
Posted By abc.working
Server code: #define MYPORT 1034 int main() ...
Server code:
#define MYPORT 1034
int main()
{
struct sockaddr_in sin;
struct sockaddr_in cin;
int s = socket(PF_INET,SOCK_STREAM,0);
sin.sin_family = AF_INET;
sin.sin_port =...
22,305
Posted By abc.working
I'm doing the same and not closing stdin...
I'm doing the same and not closing stdin also(explicitly). Still my accept returns a 0 though the server is able to print the client address.
22,305
Posted By abc.working
Socket programming : Accept return 0.
I have a server and client code.
My server says accept and my client says a connect.
After accept when i print inet_ntoa(cin.sin_addr) by running the client on same machine i get 127.0.01 but...
Showing results 1 to 8 of 8

 
All times are GMT -4. The time now is 08:42 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy