Networking Forums

Networking Forums > Computer Networking > Linux Networking > Designing a TCP/IP server for ARM

Reply
Thread Tools Display Modes

Designing a TCP/IP server for ARM

 
 
Abdul Razaq
Guest
Posts: n/a

 
      03-24-2006, 03:28 AM
Hey everyOne!

I'm using ARM - 9 Series with running linux kernel version 2.4.x. I
have setup a server application for accepting TCP/IP requests and it
works fine.
Now what I want t know is that what should be the generic design for
this server? My existing design is something like:
SERVER:
1) Creating a socket for incoming.
2) Bind it statically.
3) Waiting for client
4) Get the request from client [ Receive ]
5) Do appropriate actions
6) Send result back to client [ Send ]
7) Close the client

Step 3 to 7 are in wild loop (while(1)) so every time I receive a
request I use to create a new connection and close it as soon as I'm
done with step 6.

Following is the abstraction of my client.
CLIENT:
Say there are tow actions performed by client.
1) Start getting data from server.
2) Stop getting data from server.

I'm doing the above in following manner:
1) Request to connect
2) Send Query to server
3) Receive results from server
4) As server always close the connection so I do the same in client
too. Yeah closing the connection.

Step 1 to 4 are performed in wild loop too until there is a Stop
reading action.


Design constraint:
As this server is for embedded system so along the memory constrains I
do have to make it human interactive less.

Question:
a) How good and efficient it is to accept and close the collection
every time? Where as my client is suppose to get the data from server
in continuous manner.
b) I have observed on Fedora core that some times I couldn't get the
required port but frankly havn't observed this behavior in ARM. Let
say it happens on ARM too so what to do then? As there will be no human
interaction to kill the running process and start it again;-)
c) Shall I keep the connection alive unless timeout or close action
from client ?


Thanks for your suggestions.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Designing a Network nummer31 Home Networking 1 05-25-2011 01:24 PM
Help in designing valid ethernet packets? avi01 Linux Networking 1 05-13-2008 04:42 AM
Recommendations for best practice for designing geographically disparateAD Robert Gordon Windows Networking 2 11-03-2007 08:32 AM
Help designing wireless network Thomas Hedden Linux Networking 7 01-09-2006 05:15 PM
Designing a small network (30 users) IT Windows Networking 6 02-18-2004 05:05 PM



1 2 3 4 5 6 7 8 9 10 11