Google Groups Home
Help | Sign in
Message from discussion Looking for Finger daemon
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Ed Costello  
View profile
 More options Feb 21 1994, 5:07 pm
Newsgroups: comp.os.os2.networking
From: e...@costello.mcl.ibm.com (Ed Costello)
Date: Mon, 21 Feb 1994 22:07:10 GMT
Local: Mon, Feb 21 1994 5:07 pm
Subject: Re: Looking for Finger daemon
Simple outline of a fingerd client for inetd:
/**/
/* init info,data      */ info = ""; data = "";
/* add rxsock          */ rc = RxFuncAdd("SockLoadFuncs","RxSock","SockLoadFuncs")
/* load rxsock         */ rc = SockLoadFuncs()
/* socket from inetd   */ Parse arg ns
/* Connect             */ rc = SockGetPeerName(ns,"peer.!")
/* Get real name       */ rc = SockGetHostByAddr(peer.!addr,"peer.!")
/* Get any user data   */ rc = SockRecv(ns,"data",1000)
/* do stuff: ----------------------------------------------------------
Note: the variable data contains what, if anything, was sent by the client.
      1000 is the buffer length (pick whatever you want)

Do whatever processing you want to do with "data".

Put return information in the variable "info".  Each line must be ended
by crlf.
-----------------------------------------------------------------------*/
/* Get the length      */ textlength = length(info)
/* Send it             */ rc = SockSend(ns,info,textlength)
/* close connection    */ rc = SockSoClose(ns)
/* leave!              */ exit

//SIG     JOB                                                     -ed costello
//MAIL TYPE=(INTERNET)                                   coste...@vnet.ibm.com


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google