here is the detailed description: Can any one give me the code or guide.
Create a networking application using the socket interface to implement a "computing engine" service over TCP.
following describes the application, session, and presentation layers.
C language program that reads a list of numbers, integer or floating point, separated with newlines, from the client side, and outputs the average of these numbers. Lines that begin with the character | are called substitutions; substitutions should be executed and your program should use the elapsed running time (in seconds) for its calculation.
The server reads all lines, and return the average value of all of these values (include the elapsed running time of some execution)
Here is an example output:
Last edited by pludi; 10-07-2009 at 03:20 AM..
Reason: code tags, please...
i am new in linux environment .I have used vi editor of Unix to get a programe compiled through "gcc ".kindly give me the options to get a program compiled & executed written in c on vi editor.
I want the command to compile a file and the command to get that compiled file executed with any... (2 Replies)
i would like advice on the usbject of c programming (in the middle of reading a book on C). could i benefit more if i apply that knowledge in the unix format if i were able to, or would that take the point out of learning C, basically I want to stay away from strying too far away from unix and use... (1 Reply)
Several months ago I found a link that explained the difference between how a Unix Systems Admin would do scripting compared to what a Unix Programmer would do.
It showed a basic script and then show several iterations that explained how the Systems Admin would change it to make it better. I was... (0 Replies)
Hello all!!
I am new to programming, and to this forum. :D
I am having sort of a problem. Me and my coworker are working on a code, both of us are stumped on a few things.
One is we have a whole log file, i have found how to extract by column, but not by row. I need to extract by both.:confused:... (7 Replies)
Hello,
I am trying to learn Networking Programming in C in unix enviorment. I want to know how good it is to become a network programmer. i am crazy about Network programming but i also want to opt for the best carreer options. Anybody experienced Network Programmer, please tell me is my... (5 Replies)
Can someone help me on suggesting some ways to access the memory content in RAM directly from C/C++ source code.
Please provide me any book name or any URL so that I can get an exhaustive
knowledge over it.
If possible please give me some tips on interacting with hardwares directly
through... (3 Replies)
I have started writing one script. It is not taking the if block.
Here is the script:
#!/bin/sh
set USER='/usr/ucb/whoami'
#######################################################################
#Killing Process
#######################################################################... (6 Replies)
Hello.
I like Linux and C programming language. Allways wanted to understand kernel and become a Linux system programmer. And I also like Objective-C and iOS. These two programming areas have relations:
1. Linux and iOS are UNIX-like systems, POSIX compliant.
2. It is useful to know C language... (2 Replies)
Discussion started by: Rockatansky
2 Replies
LEARN ABOUT DEBIAN
shevek_socket
shevek::socket(3) Library Functions Manual shevek::socket(3)NAME
shevek::socket -
Use a unix-domain, tcp or avahi network connection with shevek::fd.
SYNOPSIS
#include <socket.hh>
Inherits shevek::fd.
Inherited by shevek::telnet.
Public Types
typedef sigc::signal0< void > disconnect_t
Disconnect signal type.
typedef sigc::slot0< void > listen_t
New connection callback type.
Public Member Functions
void listen_unix (std::string const &file, listen_t cb, unsigned queue=10)
Listen for new connections on a UNIX socket. Use listen instead.
void listen_tcp (std::string const &service, listen_t cb, unsigned queue=10)
Listen for new connections on a TCP socket. Use listen instead.
void listen_avahi (std::string const &service, Glib::ustring const &protocol, Glib::ustring const &name, listen_t cb, unsigned queue=10)
Listen for new connections on a TCP socket, and register it with avahi. Use listen instead.
void listen (std::string const &port, listen_t cb, unsigned queue=10)
Listen for new connections.
void connect_unix (std::string const &unix_name)
Connect to a UNIX socket. Use connect instead.
void connect_tcp (std::string const &host, std::string const &service)
Connect to a TCP socket. Use connect instead.
void connect_avahi (avahi::browser::owner const &target, avahi::browser::details const &details=avahi::browser::details())
Connect to an avahi TCP socket. Use connect instead.
void connect (std::string const &port)
Connect to a socket.
void accept (Glib::RefPtr< socket > sock)
Accept a connection (only allowed on a listening socket).
std::string get_peer_info (bool numeric=false) const
Get information about the other side of a connection.
std::string get_own_info (bool numeric=false) const
Get info about our side of the connection.
disconnect_t signal_disconnect ()
Schedule a function to be called when the socket is disconnected.
void disconnect ()
Disconnect the socket without reconnecting.
Static Public Member Functions
static Glib::RefPtr< socket > create (Glib::RefPtr< Glib::MainContext > main=Glib::MainContext::get_default())
Create a new socket.
Protected Member Functions
socket (Glib::RefPtr< Glib::MainContext > main)
Constructor.
virtual ~socket ()
Destructor.
Detailed Description
Use a unix-domain, tcp or avahi network connection with shevek::fd.
Member Function Documentation
void shevek::socket::connect (std::string const &port)
Connect to a socket. This is the preferred function to use. Format: UNIX domain sockets: anything with at least one / in it. TCP:
hostname:port, where the hostname and colon may be omitted, and the port may be a service or number. Avahi: name|protocol, where name is
the application name, and protocol the connection type.
void shevek::socket::listen (std::string const &port, listen_tcb, unsignedqueue = 10)
Listen for new connections. This is the preferred function to use. Format: UNIX domain sockets: anything with at least one / in it. TCP
services: the name. TCP port numbers: the number. For TCP, appending |name|protocol, where name is the application name and protocol the
connection type.
Author
Generated automatically by Doxygen for libshevek from the source code.
libshevek Fri May 11 2012 shevek::socket(3)