2 * FreeRDP: A Remote Desktop Protocol Client
3 * Transmission Control Protocol (TCP)
5 * Copyright 2011 Vic Lee
6 * Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
30 #include <freerdp/types.h>
31 #include <freerdp/settings.h>
32 #include <freerdp/utils/stream.h>
35 #define MSG_NOSIGNAL 0
38 typedef struct rdp_tcp rdpTcp;
45 struct rdp_settings* settings;
51 boolean tcp_connect(rdpTcp* tcp, const char* hostname, uint16 port);
52 boolean tcp_disconnect(rdpTcp* tcp);
53 int tcp_read(rdpTcp* tcp, uint8* data, int length);
54 int tcp_write(rdpTcp* tcp, uint8* data, int length);
55 boolean tcp_set_blocking_mode(rdpTcp* tcp, boolean blocking);
56 boolean tcp_set_keep_alive_mode(rdpTcp* tcp);
58 rdpTcp* tcp_new(rdpSettings* settings);
59 void tcp_free(rdpTcp* tcp);