libIEC61850
Open-source IEC 61850 MMS server and client library
Main Page
Modules
Data Structures
Files
Downloads
Contact
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Groups
Pages
hal
socket
socket.h
Go to the documentation of this file.
1
/*
2
* socket.h
3
*
4
* Copyright 2013 Michael Zillgith
5
*
6
* This file is part of libIEC61850.
7
*
8
* libIEC61850 is free software: you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published by
10
* the Free Software Foundation, either version 3 of the License, or
11
* (at your option) any later version.
12
*
13
* libIEC61850 is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU General Public License for more details.
17
*
18
* You should have received a copy of the GNU General Public License
19
* along with libIEC61850. If not, see <http://www.gnu.org/licenses/>.
20
*
21
* See COPYING file for the complete license text.
22
*/
23
24
#ifndef SOCKET_H_
25
#define SOCKET_H_
26
27
#include <stdint.h>
28
36
typedef
struct
sServerSocket*
ServerSocket
;
37
39
typedef
struct
sSocket*
Socket
;
40
49
ServerSocket
50
TcpServerSocket_create
(
char
* address,
int
port);
51
52
53
void
54
ServerSocket_listen
(
ServerSocket
socket);
55
56
Socket
57
ServerSocket_accept
(
ServerSocket
socket);
58
59
void
60
ServerSocket_setBacklog
(
ServerSocket
socket,
int
backlog);
61
62
void
63
ServerSocket_destroy
(
ServerSocket
socket);
64
65
Socket
66
TcpSocket_create
();
67
68
69
int
70
Socket_connect
(
Socket
socket,
char
* address,
int
port);
71
72
int
73
Socket_read
(
Socket
socket, uint8_t* buf,
int
size);
74
75
int
76
Socket_write
(
Socket
socket, uint8_t* buf,
int
size);
77
78
void
79
Socket_destroy
(
Socket
socket);
80
83
#endif
/* SOCKET_H_ */
Generated on Tue May 14 2013 23:20:13 for libIEC61850 by
1.8.3.1