plptools
Loading...
Searching...
No Matches
socketchannel.h
Go to the documentation of this file.
1
/*
2
* This file is part of plptools.
3
*
4
* Copyright (C) 1999 Philip Proudman <philip.proudman@btinternet.com>
5
* Copyright (C) 1999-2001 Fritz Elfert <felfert@to.com>
6
*
7
* This program is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation; either version 2 of the License, or
10
* (at your option) any later version.
11
*
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License along
18
* along with this program; if not, see <https://www.gnu.org/licenses/>.
19
*
20
*/
21
#pragma once
22
23
#include "config.h"
24
#include "
channel.h
"
25
26
class
TCPSocket
;
27
28
class
SocketChannel
:
public
channel
{
29
public
:
30
SocketChannel
(
TCPSocket
* socket,
NCP
* ncp);
31
virtual
~SocketChannel
();
32
33
void
ncpDataCallback
(
bufferStore
&
a
);
34
const
char
*
getNcpRegisterName
();
35
void
ncpConnectAck
();
36
void
ncpRegisterAck
();
37
void
ncpDoRegisterAck
(
int
) {}
38
void
ncpConnectTerminate
();
39
void
ncpConnectNak
();
40
41
bool
isConnected
()
const
;
42
void
socketPoll
();
43
private
:
44
enum
protocolVersionType
{
PV_SERIES_5
= 6,
PV_SERIES_3
= 3 };
45
bool
ncpCommand
(
bufferStore
&
a
);
46
47
TCPSocket
*
socket_
;
48
char
*
registerName_
;
49
bool
isConnected_
;
50
int
connectTry_
;
51
int
connectTryTimestamp_
;
52
};
channel.h
NCP
Definition:
ncp.h:54
SocketChannel
Definition:
socketchannel.h:28
SocketChannel::~SocketChannel
virtual ~SocketChannel()
Definition:
socketchannel.cc:42
SocketChannel::socket_
TCPSocket * socket_
Definition:
socketchannel.h:47
SocketChannel::ncpConnectNak
void ncpConnectNak()
Definition:
socketchannel.cc:153
SocketChannel::ncpConnectAck
void ncpConnectAck()
Definition:
socketchannel.cc:133
SocketChannel::getNcpRegisterName
const char * getNcpRegisterName()
Definition:
socketchannel.cc:57
SocketChannel::connectTry_
int connectTry_
Definition:
socketchannel.h:50
SocketChannel::connectTryTimestamp_
int connectTryTimestamp_
Definition:
socketchannel.h:51
SocketChannel::ncpCommand
bool ncpCommand(bufferStore &a)
Definition:
socketchannel.cc:62
SocketChannel::ncpConnectTerminate
void ncpConnectTerminate()
Definition:
socketchannel.cc:141
SocketChannel::ncpDataCallback
void ncpDataCallback(bufferStore &a)
Definition:
socketchannel.cc:50
SocketChannel::protocolVersionType
protocolVersionType
Definition:
socketchannel.h:44
SocketChannel::PV_SERIES_5
@ PV_SERIES_5
Definition:
socketchannel.h:44
SocketChannel::PV_SERIES_3
@ PV_SERIES_3
Definition:
socketchannel.h:44
SocketChannel::socketPoll
void socketPoll()
Definition:
socketchannel.cc:163
SocketChannel::ncpRegisterAck
void ncpRegisterAck()
Definition:
socketchannel.cc:148
SocketChannel::isConnected_
bool isConnected_
Definition:
socketchannel.h:49
SocketChannel::isConnected
bool isConnected() const
Definition:
socketchannel.cc:247
SocketChannel::ncpDoRegisterAck
void ncpDoRegisterAck(int)
Definition:
socketchannel.h:37
SocketChannel::registerName_
char * registerName_
Definition:
socketchannel.h:48
TCPSocket
A class for dealing with sockets.
Definition:
tcpsocket.h:38
bufferStore
A generic container for an array of bytes.
Definition:
bufferstore.h:37
channel
Definition:
channel.h:32
a
static rfsv * a
Definition:
main.cc:53
ncpd
socketchannel.h
Generated by
1.9.5