File: MySocket.cpp

package info (click to toggle)
wvstreams 4.0.2-4
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 6,420 kB
  • ctags: 6,518
  • sloc: cpp: 52,544; sh: 5,770; ansic: 810; makefile: 461; tcl: 114; perl: 18
file content (24 lines) | stat: -rwxr-xr-x 457 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include "StdAfx.h"
#include ".\mysocket.h"

MySocket::MySocket(WvStream *_clone) :
    WvStreamClone(_clone)
{
    uses_continue_select = true;
}

void MySocket::execute()
{
    WvStreamClone::execute();

    print("Hello world! What is your name?\n");
    WvString name = getline(-1);
    print("Nice to meet you, %s. Any last words?\n", name);
    WvString lastwords = getline(-1);
    printf("Goodbye!\n");
    close();
}

MySocket::~MySocket(void)
{
}