Tcp Ip Send Receive Server Program


 
Thread Tools Search this Thread
Special Forums IP Networking Tcp Ip Send Receive Server Program
# 1  
Old 10-10-2005
Network Tcp Ip Send Receive Server Program

Requirements:
A server program should read a file and send the message to the client . if the file is not there, then switch to the receive part of the same program and receive any messages from the socket. If no messages to receive then switch to send part of the program to send any messages. This should work continuously.

How to do this? Steps to do it will be enough.
# 2  
Old 10-24-2005
u should use the select() if using c (coz i had worked with it) .. non blocking select will ensure continual listening for incoming requests... as and when req come in.. put them in a data structure and then use ur thread to read that file.. just call those functions in the order required by u... i hope this helps u... and do lemme know if i have gone wrong somewhere...(for the others!)
# 3  
Old 11-02-2005
:)

ues Xscan get the hole or others tool.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Send/receive file through serial using minicom

i have connected with my board through serial interface using minicom and i am running a bash script, which should test ethernet (ping test), USB read/write, RS232 .. I have managed to test ethernet and USB read/write. I test ethernet with ping. I test USB read/write, using dd and verifying... (10 Replies)
Discussion started by: linuxmember
10 Replies

2. Solaris

Too much TCP retransmitted and TCP duplicate on server Oracle Solaris 10

I have problem with oracle solaris 10 running on oracle sparc T4-2 server. Os information: 5.10 Generic_150400-03 sun4v sparc sun4v Output from tcpstat.d script TCP bytes: out outRetrans in inDup inUnorder 6833763 7300 98884 0... (2 Replies)
Discussion started by: insatiable1610
2 Replies

3. Solaris

zfs send receive performance issues

I 'm trying to clone a zfs file system pool/u01 to a new file system called newpool/u01 using following commands zfs list zfs snapshot pool/u01@new zfs send pool/u01@new | zfs -F receive newpool/u01 Its a 100G file system snapshot and copied to same server on different pool and... (9 Replies)
Discussion started by: fugitive
9 Replies

4. Shell Programming and Scripting

Send Receive Mails

Hi All, I am writing one script to automate one long process. In this process we need to upload some input files and download some output files. So , I want to automate this upload and download by using mail functionality. I want to trigger this script when I am sending mail to server. I know... (0 Replies)
Discussion started by: NirajThakar
0 Replies

5. Shell Programming and Scripting

How to monitor send/receive bytes

Hello, I need to create a script to monitor sent/received packets for a period of time (the period of time will be a users input) and write the result to some txt file. Is there any command (don`t want to use any 3rd party sw) what I can use? I`m using Solaris 10. Thank you (14 Replies)
Discussion started by: msojka77
14 Replies

6. Programming

how can I send and receive data in client server socket programing

char name; printf ("Welcome to the server \n"); printf ("Enter user name: \n"); scanf ("%c", &name); how can client send name to server:what should be the code? int send ( int sid , const char ∗buffer Ptr , int len , int f l a g ) how can client receive ack from... (1 Reply)
Discussion started by: saiful_911
1 Replies

7. Shell Programming and Scripting

Writing a program to receive the GPS data and send to other server

Hi, I would like to write a program to receive the GPS data and then send the data via network to other program. All of the program is not write yet(include host and sender) All of the server OS is unix or linux Could you mind to give me some idea to do this? Thanks so much! Ken ... (2 Replies)
Discussion started by: kenlok
2 Replies

8. Programming

Send/Receive buffer size??

Dear friends, How do I find the TCP send and receive buffer size? (1 Reply)
Discussion started by: nagalenoj
1 Replies

9. UNIX for Dummies Questions & Answers

Can send but not receive email

Hi, One of the users in our company can send but not receive email. We are using SENDMAIL in conjunction with procmail. The funny thing is that all his sent email is in his /var/spool/mail but the email client does not pick anything up! He is using IMAP. Anyone see have any ideas? (2 Replies)
Discussion started by: mojoman
2 Replies

10. UNIX for Dummies Questions & Answers

I can send but cannot receive mail with unix?

Hi all, First post! I have just discovered that I can use unix to send mail to a mail address. I normally use entourage for my mail. This unix mail is very intriguing to me, but something is not working... I tried the search, but could not find the answer... This works: (in terminal)... (1 Reply)
Discussion started by: bjorn
1 Replies
Login or Register to Ask a Question