03-01-2009
Socket's session
Hi there,
I need a socket (server) in perl that when session created by a client request, take a string and after some proccesing on it, send a string(response) and close the session. but socket wait for future requests.
It's possible to lead me?!
![Frown Smilie](https://www.unix.com/images/smilies/frown.gif)
? or write a psudo code?
Thanks in advance.
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
1. If I use an software application(which connects to the database in the server) in my local pc, how many PID should be registered? Would there be PID for the session and another PID for socket connection?
2. I noticed (through netstat) that when I logged in using the my software application,... (1 Reply)
Discussion started by: pcx26
1 Replies
2. Shell Programming and Scripting
Hi there.
How do I make the DB connection see the parameter variables passed to the unix script ? The code snippet below isn't working properly.
sqlplus << EOF
user1@db1/pass1
BEGIN
PACKAGE1.perform_updates($1,$2,$3);
END;
EOF
Thanks in advance,
Abrahao. (2 Replies)
Discussion started by: 435 Gavea
2 Replies
3. Shell Programming and Scripting
Hi,
Apologies if anyone has read my recent post on the same subject in the Linux forum, just thought actually the solution might more likely come from scripting.
Essentially, I am trying to restrict access to directories based on the user's name AND their location on a session-by-session... (3 Replies)
Discussion started by: en7smb
3 Replies
4. Solaris
I am not able to login in gnome session and java session in Sun solaris 9& 10 respectively through xmanager as a nis user, I am able to login in common desktop , but gnome session its not allowing , when I have given login credentials, its coming back to login screen, what shoul I do to allow nis... (0 Replies)
Discussion started by: durgaprasadr13
0 Replies
5. UNIX for Advanced & Expert Users
Hi,
I was porting ipv4 application to ipv6; i was done with TCP transports. Now i am facing problem with SCTp transport at runtime.
To test SCTP transport I am using following server and client socket programs. Server program runs fine, but client program fails giving Invalid Arguments for... (0 Replies)
Discussion started by: chandrutiptur
0 Replies
6. Shell Programming and Scripting
Besides 'who am i' and 'tty' what commands could be used to determine if a session is interactive as compared to a web process or cron process. Any command should work with the common unix variants. (3 Replies)
Discussion started by: jgt
3 Replies
7. Programming
Why does this socket function only read the first 1440 chars of the stream. Why not the whole stream ? I checked it with gdm and valgrind and everything seems correct...
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <string.h>
#include... (3 Replies)
Discussion started by: cyler
3 Replies
8. Solaris
what is the difference between desktop session and console session in solaris
as i am wondering we use option -text for the former and -nowin for the later (1 Reply)
Discussion started by: kishanreddy
1 Replies
9. IP Networking
I need clarification on whether it is okay to set socket options on a listening socket
simultaneously when it is being used in an accept() call?
Following is the scenario:-
-- Task 1 - is executing in a loop - polling a listen socket, lets call it 'fd', (whose file descriptor is global)... (2 Replies)
Discussion started by: jake24
2 Replies
LEARN ABOUT CENTOS
ne_session_destroy
NE_SESSION_CREATE(3) neon API reference NE_SESSION_CREATE(3)
NAME
ne_session_create, ne_close_connection, ne_session_destroy - set up HTTP sessions
SYNOPSIS
#include <ne_session.h>
ne_session *ne_session_create(const char *scheme, const char *hostname, unsigned int port);
void ne_close_connection(ne_session *session);
void ne_session_destroy(ne_session *session);
DESCRIPTION
An ne_session object represents an HTTP session - a logical grouping of a sequence of HTTP requests made to a certain server. Any requests
made using the session can use a persistent connection, share cached authentication credentials and any other common attributes.
A new HTTP session is created using the ne_session_create function; the hostname and port parameters specify the origin server to use,
along with the scheme (usually "http"). Before the first use of ne_session_create in a process, ne_sock_init must have been called to
perform any global initialization needed by any libraries used by neon.
To enable SSL/TLS for the session, pass the string "https" as the scheme parameter, and either register a certificate verification function
(see ne_ssl_set_verify) or trust the appropriate certificate (see ne_ssl_trust_cert, ne_ssl_trust_default_ca).
To use a proxy server for the session, it must be configured (see ne_session_proxy) before any requests are created from session object.
Further per-session options may be changed using the ne_set_session_flag interface.
If it is known that the session will not be used for a significant period of time, ne_close_connection can be called to close the
connection, if one remains open. Use of this function is entirely optional, but it must not be called if there is a request active using
the session.
Once a session has been completed, ne_session_destroy must be called to destroy the resources associated with the session. Any subsequent
use of the session pointer produces undefined behaviour. The session object must not be destroyed until after all associated request
objects have been destroyed.
NOTES
The hostname passed to ne_session_create is resolved when the first request using the session is dispatched; a DNS resolution failure can
only be detected at that time (using the NE_LOOKUP error code); see ne_request_dispatch for details.
RETURN VALUES
ne_session_create will return a pointer to a new session object (and never NULL).
EXAMPLES
Create and destroy a session:
ne_session *sess;
sess = ne_session_create("http", "host.example.com", 80);
/* ... use sess ... */
ne_session_destroy(sess);
SEE ALSO
ne_ssl_set_verify, ne_ssl_trust_cert, ne_sock_init, ne_set_session_flag
AUTHOR
Joe Orton <neon@lists.manyfish.co.uk>
Author.
COPYRIGHT
neon 0.30.0 31 July 2013 NE_SESSION_CREATE(3)