On Wed, 23 Dec 1998, Daniel Martin wrote: > echoed. I have attached below a transcript of a simple telnet session > to show you what's going on.
Thanks alot ! :) It's great. Explain all the steps. > Looking at your mail again, it appears that you are writing both the > client and the server part of this application - if so, then you > shouldn't be touching telnet options at all No. I'm just doing the server. My project is to do a BBS(Bulletin Board Service) server. Finally I already had non-echo working as I want! :) Meanwhile, I'm having other problem: I would like to be able to send bold, underline or even colors to the client(which connects to my server by telnet <machine> <port>). It seems I that I need to use terminfo but with socket seems to be more complicated. :( 1. I don't want to use dup2() to use stdout as socket descriptor! I need stdout to send results from server(like: got connection from 127.0.0.1 on port # 2344). 2. I'm trying to use terminfo with success *but* when using tigetstr() I get "Segmentation Fault" ! :( char *tigetstr(const char *capname); This Segmentation Fault only happens, to me, when capname's variable don't exist on terminfo(5) ! So, I don't have no chance to control it, I I think. I say that cause i had a file which will be read and convert it! Something like: ----cut here---- -------------------- \bold|Welcome\sgr0| \smul|BBS\sgr0| -------------------- ----cut here------- I had a function which read those files and apply it to the client's descriptor. Sintax: \<capname>| 3. What I do on my program is to get the result of tigestr() - when it works - and remove the "$<2>" from the that result! So that I get something like "[1m" and send it to the client descriptor. It seems to work. I don't do any test to the remote machine about it environment variable. I just do: setupterm( "vt100", client_fd, (int*)0 ); It seems to be working ... I still had those segmentation fault problem.:( Thanks. Best regards and a Mery Christmas to you, Nuno Carvalho ?????????????????????????????? Nuno Emanuel F. Carvalho Dep. Informatics Engineering University of Coimbra PGP key available at finger ??????????????????????????????