04-14-2009
Quote:
Originally Posted by
kev_1234
The purely reason for this is to understand how C sockets is able to extract the data
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'.
10 More Discussions You Might Find Interesting
1. 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
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
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
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
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
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
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
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
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
how to include socket.h in visual studio 2005.. (2 Replies)
Discussion started by: asd123
2 Replies
LEARN ABOUT DEBIAN
poe::filter::http::parser
POE::Filter::HTTP::Parser(3pm) User Contributed Perl Documentation POE::Filter::HTTP::Parser(3pm)
NAME
POE::Filter::HTTP::Parser - A HTTP POE filter for HTTP clients or servers
VERSION
version 1.06
SYNOPSIS
use POE::Filter::HTTP::Parser;
# For HTTP Servers
my $request_filter = POE::Filter::HTTP::Parser->new( type => 'server' );
my $arrayref_of_request_objects = $filter->get( [ $stream ] );
my $arrayref_of_HTTP_stream = $filter->put( $arrayref_of_response_objects );
# For HTTP clients
my $response_filter = POE::Filter::HTTP::Parser->new( type => 'client' );
my $arrayref_of_HTTP_stream = $filter->put( $arrayref_of_request_objects );
my $arrayref_of_response_objects = $filter->get( [ $stream ] );
DESCRIPTION
POE::Filter::HTTP::Parser is a POE::Filter for HTTP which is based on HTTP::Parser.
It can be used to easily create POE based HTTP servers or clients.
With the "type" set to "client", which is the default behaviour, "get" will parse HTTP::Response objects from HTTP streams and "put" will
accept HTTP::Request objects and convert them to HTTP streams.
With the "type" set to "server", the reverse will happen. "get" will parse HTTP::Request objects from HTTP streams and "put" will accept
HTTP::Response objects and convert them to HTTP streams. Like POE::Filter::HTTPD if there is an error parsing the HTTP request, this filter
will generate a HTTP::Response object instead, to encapsulate the error message, suitable for simply sending back to the requesting client.
CONSTRUCTOR
"new"
Creates a new POE::Filter::HTTP::Parser object. Takes one optional argument, "type" which determines whether the filter will act in
"client" or "server" mode. "client" is the default if "type" is not specified.
'type', set to either 'client' or 'server', default is 'client';
METHODS
"get"
"get_one_start"
"get_one"
Takes an arrayref which contains lines of text. Returns an arrayref of either HTTP::Request or HTTP::Response objects depending on the
"type" that has been specified.
"get_pending"
Returns any data remaining in a filter's input buffer. The filter's input buffer is not cleared, however. Returns an array reference
if there's any data, or undef if the filter was empty.
"put"
Takes an arrayref of either HTTP::Response objects or HTTP::Request objects depending on whether "type" is set to "server" or "client",
respectively.
If "type" is "client", then this accepts HTTP::Request objects. If "type" is "server", then this accepts HTTP::Response objects.
This does make sense if you think about it.
The given objects are returned to their stream form.
"clone"
Makes a copy of the filter, and clears the copy's buffer.
CREDITS
The "put" method for HTTP responses was borrowed from POE::Filter::HTTPD, along with the code to generate HTTP::Response on a parse error,
by Artur Bergman and Rocco Caputo.
SEE ALSO
POE::Filter
HTTP::Parser
POE::Filter::HTTPD
AUTHOR
Chris Williams <chris@bingosnet.co.uk>
COPYRIGHT AND LICENSE
This software is copyright (c) 2011 by Chris Williams, Artur Bergman and Rocco Caputo.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
perl v5.12.3 2011-03-07 POE::Filter::HTTP::Parser(3pm)