Sponsored Content
Full Discussion: C - HTTP Socket Programming
Top Forums Programming C - HTTP Socket Programming Post 302307087 by kev_1234 on Tuesday 14th of April 2009 02:24:41 PM
Old 04-14-2009
Quote:
Originally Posted by Corona688
They work much the same as C files, you just read from them. You read data from them with the recv() system call instead of the read() one but it's the same idea. You can see its manual page via 'man recv'.
OkaySmilie

Also in the code below which u posted earlier y does it only extracting the first three lines on the html part? How can it extract the whole content of the html file?

Thanks

Code:
$ ./client mywebsite 'GET /
' 80
Received: 
<!-- Beginning of page_begin() output -->
<html><head>
  <titl
$

 

10 More Discussions You Might Find Interesting

1. Programming

Socket Programming

Dear Reader, Is there any way to check up socket status other than 'netstatus ' Thanks in advance, (1 Reply)
Discussion started by: joseph_shibu
1 Replies

2. Programming

Socket Programming socket

Hello, I actually try to make client-server program. I'm using SCO OpenServer Release 5.0.0 and when I try to compile my code (by TELNET) I've got this error : I'm just using this simple code : and I get the same error if I use : If someone can help me, Thanks (2 Replies)
Discussion started by: soshell
2 Replies

3. IP Networking

socket programming

my system is a stand alone system... i want to try doing socket porgramming..ihave heard that this is usually done during testing... how can i do that....? (6 Replies)
Discussion started by: damn_bkb
6 Replies

4. Programming

Socket programming

Hello!:) I'm trying to do some socket programming based on the following situation: I have a directory service named Casino that will hold all the information regarding the gamers that will try to connect to it in order to play a game(for example (Blackjack).Once they make the login they are... (4 Replies)
Discussion started by: maracumbigo
4 Replies

5. Programming

HTTP Keep-Alive socket problem

Hello everyone, I am a newbie in UNIX/Linux socket programming. This is a class project that I had trouble with. ================================================== I was trying to make “Keep-Alive” HTTP connections to the server in a tiny web crawler project. Here is the problem: when I tried... (0 Replies)
Discussion started by: imdupeng
0 Replies

6. IP Networking

socket programming

Hello Everyone Iam working on tcp/ip programming.with some time interval server has to send data.client has to close the connection and to open the connection between the time interval.this is the scenario when iam closing the connection in client side the connection terminates.how to... (1 Reply)
Discussion started by: sureshvaikuntam
1 Replies

7. Programming

unable to get end of file while reading HTTP data from socket

I am trying to read HTTP data from a socket. However, for the final set of data being read using read(), read blocks and the control doesnt come back for further processing. I tried using select, but it didn't work... Any help would be greatly acknowledged.:) (2 Replies)
Discussion started by: Harish.joshi
2 Replies

8. Programming

sending http url through http socket programming..

hi am senthil am developing a software to send and receive SMS using HTTP connection first of all am forming a URL and sending that URL to a remote server using my Client Program i send that url through Socket(using Send() Function) if i send more than one URL one by one using the same... (0 Replies)
Discussion started by: senkerth
0 Replies

9. Shell Programming and Scripting

sending http url through http socket programming..

hi am senthil am developing a software to send and receive SMS using HTTP connection first of all am forming a URL and sending that URL to a remote server using my Client Program i send that url through Socket(using Send() Function) if i send more than one URL one by one using the same... (4 Replies)
Discussion started by: senkerth
4 Replies

10. Programming

socket programming

how to include socket.h in visual studio 2005.. (2 Replies)
Discussion started by: asd123
2 Replies
Net.recv(3kaya) 					       Kaya module reference						   Net.recv(3kaya)

NAME
Net::recv - Recieve data from a connection. SYNOPSIS
String recv( NetHandle h, Int maxlen=-1, Int timeout=0 ) ARGUMENTS
h The connection maxlen The maximum number of bytes to read (or unlimited, if negative). For TLS connections, this is always unlimited. Note that if the data to be received contains multi-byte characters, care must be taken to avoid ending receiving part-way through a multi-byte character. timeout The number of seconds to wait without input before timing out. The default is zero. For TLS connections, this parameter is ignored. DESCRIPTION
Reads up to maxlen bytes from the connection, and times out after timeout seconds. AUTHORS
Kaya standard library by Edwin Brady, Chris Morris and others (kaya@kayalang.org). For further information see http://kayalang.org/ LICENSE
The Kaya standard library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (version 2.1 or any later version) as published by the Free Software Foundation. RELATED
Net.NetHandle(3kaya) Net.accept(3kaya) Net.connect(3kaya) Net.microPending(3kaya) Net.microRecv(3kaya) Net.pending(3kaya) Net.recvByte(3kaya) Net.recvBytes(3kaya) Net.send(3kaya) Kaya October 2012 Net.recv(3kaya)
All times are GMT -4. The time now is 02:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy