Writing a Socket Server


 
Thread Tools Search this Thread
Special Forums IP Networking Writing a Socket Server
# 1  
Old 12-13-2010
Writing a Socket Server

Hi All
I have to design a server socket program.The requirement is Each connection from client will be in different threads.

The challenge is Suppose Server is now connected with two client Client A and client B.They will be in two different thread.

My application requirement is when server will get some message from Client A or Client B ,after processing this message it will send the messages to both Client A and client B.

Can you please suggest what will be the right approach for it .How to know what clients are open at a time .
# 2  
Old 12-13-2010
Which language u r using? Perl?
R0H0N
# 3  
Old 12-13-2010
No I am going to use C Socket
# 4  
Old 12-13-2010
Sorry..!! I m not good with C. If u can use perl then I can help u out.
R0H0N
# 5  
Old 12-13-2010
yea still ucan tell me your approach , i want the algorithm
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

Socket dual client/server Linux

I'm trying to make a "dual/server client" (ipv4,ipv6) with sockets in linux but i don't know how to join both codes. I have a dual client ipv4 and ipv6, but i have problems with the server if you notice the only difference between them it's the AF_INET (pf_inet ipv4, and if_inet6 ipv6) and the port... (3 Replies)
Discussion started by: godna
3 Replies

2. IP Networking

socket programing-problem with server

hi, i am new to socket programming.i have a problem in server.requirement is it should continuosly read the requests from client(sends requests continuously) and after certain delay(i kept der sleep) should send response. for this i used msgqueues so that after reading it is sending into... (1 Reply)
Discussion started by: chandinisree
1 Replies

3. Post Here to Contact Site Administrators and Moderators

socket programing-problem with server

hi, i am new to socket programming.i have a problem in server.requirement is it should continuosly read the requests from client(sends requests continuously) and after certain delay(i kept der sleep) should send response. for this i used msgqueues so that after reading it is sending into... (1 Reply)
Discussion started by: chandinisree
1 Replies

4. Programming

socket programing in client server

hei, i want to enter name and read it by client server socket program after checking name validity put the password and check.if ok than server clirnt say correct other wise incorrect. below my code: char name; printf ("Welcome to the server \n"); printf ("Enter user name: \n"); scanf... (1 Reply)
Discussion started by: saiful_911
1 Replies

5. Shell Programming and Scripting

Writing in a socket trough TCL problem.

Hello everyone: I have a script that writes and read DATA in/from a socket, but i have a great problem while writing. My socket is created in this way: set connection fconfigure $connection -encoding binary -translation binary -blocking 1 And the writer procedure is this one: ... (0 Replies)
Discussion started by: trutoman
0 Replies

6. Programming

Client/Server Socket Application - Preventing Client from quitting on server crash

Problem - Linux Client/Server Socket Application: Preventing Client from quitting on server crash Hi, I am writing a Linux socket Server and Client using TCP protocol on Ubuntu 9.04 x64. I am having problem trying to implement a scenario where the client should keep running even when the... (2 Replies)
Discussion started by: varun.nagpaal
2 Replies

7. UNIX for Dummies Questions & Answers

open a socket on a server

Hello, I want to test a firewall rule between 2 servers A & B. I need a command that will open a socket on the server A such as: themagiccommand MyPort And on the client server B, i will run the command telnet IP_serverA Myport Can you help me ? Thank you Gunther (0 Replies)
Discussion started by: gunbol
0 Replies

8. Programming

socket communication but not writing

hello, when i execute my code server side it connects with the client and when i try to write through the server into the client the program exits. i could not understand whether it is the problem with the server or with the client.The Protocol is TCP/IP. thanking you. (2 Replies)
Discussion started by: madfox
2 Replies

9. UNIX for Dummies Questions & Answers

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 both. Thanks. (1 Reply)
Discussion started by: abc.working
1 Replies

10. HP-UX

Problem in HP-Unix while writing into socket

Our system is having a server and multiple clients. We are monitoring the client FDs using select() system call in HP-UX. After establishing connection-using socket with the remote client, before start sending the data we are checking the status of socket using select( ) call. For first 16... (0 Replies)
Discussion started by: AshokG
0 Replies
Login or Register to Ask a Question