LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-10-2008, 08:24 AM   #1
karimasif
LQ Newbie
 
Registered: Aug 2007
Posts: 13

Rep: Reputation: 0
Infomration regarding the send() and recv() function


Hi

I am working on a send and recv function used to send traffic over a socket. I just want to know what are the "total" functions of send() and recv() functions.

- Does send() function, after sending the packet, waits for the acknowledge from the server (if connection oriented)

- If I want to catch a response from the server, and I am using the recv() function, then I will get the reply of my request using the same socket.

e.g. if I am sending the HTTP request packet and the response of it which might HTTP 1.1/ 200 or 404 or else how can i get it.

I am able to send the request but I tried to get the response such like http response or ftp response but fails.

Can some one help me.
 
Old 01-13-2008, 10:49 AM   #2
Looking_Lost
Senior Member
 
Registered: Apr 2003
Location: Eire
Distribution: Slackware 12.0, OpenSuse 10.3
Posts: 1,120

Rep: Reputation: 45
I'm just learning myself all be it wrapping it up in a C++ class. As far as I know send does what it says - it sends the data and recv receives, you don't worry about the tcp/handshake and all that lower level stuff but react depending upon any errors received or not via their return values.

You use the same socket to send and receive and you'll have to parse the response to make use of it in the particular context you're using the data, or in the case of a text/html page you can just display the response in a console to see if it's worked.

Like I said though, just beginning in this particular area so if I'm wrong, I'm more than happy to be corrected.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
high recv-q and send-q and collision rate sarah_haff Linux - Networking 2 08-19-2008 06:49 AM
send/recv binary files with C++ sockets dafatdude Programming 3 02-12-2006 08:02 AM
recv() function of SOCKET ashucool83 Programming 1 10-08-2005 07:38 PM
function recv() in socket husniteja Programming 1 08-18-2004 09:06 AM
Post fix can recv mail from outside but cant send. luvonmik Linux - Networking 1 03-30-2004 11:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration