Symbian platform (C++)
SDK native APIs, runtime and tooling
Loading...
Searching...
No Matches
native_tcp_client.h
Go to the documentation of this file.
1// Copyright 2026 The Symbian SDK Authors.
2// Licensed under the Apache License, Version 2.0.
3
4#ifndef SYMBIAN_API_CONNECTIVITY_NATIVE_TCP_CLIENT_H_
5#define SYMBIAN_API_CONNECTIVITY_NATIVE_TCP_CLIENT_H_
6
7#include <cstdint>
8
9#include <limits.h>
10
11class TRequestStatus;
12
14
15struct NativeTcpClient;
16struct NativeTcpListener;
17struct NativeActiveTcpListener;
18
19using NativeAcceptCallback = void (*)(void* context, NativeTcpClient* accepted,
20 int result);
21
22extern "C" int SymbianDeviceResolveIpv4(const char* hostname, int length,
23 unsigned* address,
24 std::int64_t deadline);
25extern "C" int SymbianDeviceTcpConnect(unsigned address, unsigned port,
26 NativeTcpClient** output,
27 std::int64_t deadline = INT64_MAX);
28extern "C" int SymbianDeviceTcpSend(NativeTcpClient* client,
29 const unsigned char* bytes, int length,
30 std::int64_t deadline = INT64_MAX);
31extern "C" int SymbianDeviceTcpReceive(NativeTcpClient* client,
32 unsigned char* bytes, int capacity,
33 int* received,
34 std::int64_t deadline = INT64_MAX);
35extern "C" int SymbianDeviceTcpSetNoDelay(NativeTcpClient* client,
36 bool enabled);
37extern "C" void SymbianDeviceTcpClose(NativeTcpClient* client);
38extern "C" int SymbianDeviceTcpListen(unsigned address, unsigned port,
39 bool share_with_workers,
40 NativeTcpListener** output);
41extern "C" int SymbianDeviceTcpAccept(NativeTcpListener* listener,
42 NativeTcpClient** output,
43 std::int64_t deadline = INT64_MAX);
44extern "C" int SymbianDeviceTcpBeginAccept(NativeTcpListener* listener,
45 TRequestStatus* status,
46 NativeTcpClient** output);
47extern "C" void SymbianDeviceTcpCancelAccept(NativeTcpListener* listener);
48extern "C" void SymbianDeviceTcpListenerClose(NativeTcpListener* listener);
49extern "C" int SymbianDeviceActiveTcpListen(unsigned address, unsigned port,
50 bool share_with_workers,
51 void* context,
52 NativeAcceptCallback callback,
55 NativeActiveTcpListener* listener);
57
58} // namespace symbian::api::connectivity
59
60#endif // SYMBIAN_API_CONNECTIVITY_NATIVE_TCP_CLIENT_H_
Definition active_tcp_listener.cc:11
int SymbianDeviceTcpConnect(unsigned address, unsigned port, NativeTcpClient **output, std::int64_t deadline)
Definition native_tcp_client.cc:116
int SymbianDeviceResolveIpv4(const char *hostname, int length, unsigned *address, std::int64_t deadline)
Definition native_tcp_client.cc:64
void SymbianDeviceTcpListenerClose(NativeTcpListener *listener)
Definition native_tcp_client.cc:153
int SymbianDeviceTcpAccept(NativeTcpListener *listener, NativeTcpClient **output, std::int64_t deadline)
Definition native_tcp_client.cc:232
void(*)(void *context, NativeTcpClient *accepted, int result) NativeAcceptCallback
Definition native_tcp_client.h:20
void SymbianDeviceTcpClose(NativeTcpClient *client)
Definition native_tcp_client.cc:104
void SymbianDeviceTcpCancelAccept(NativeTcpListener *listener)
Definition native_tcp_client.cc:226
void SymbianDeviceActiveTcpClose(NativeActiveTcpListener *listener)
Definition native_active_tcp_listener.cc:98
int SymbianDeviceTcpBeginAccept(NativeTcpListener *listener, TRequestStatus *status, NativeTcpClient **output)
Definition native_tcp_client.cc:201
int SymbianDeviceTcpSend(NativeTcpClient *client, const unsigned char *bytes, int length, std::int64_t deadline)
Definition native_tcp_client.cc:262
int SymbianDeviceActiveTcpAcceptNext(NativeActiveTcpListener *listener)
Definition native_active_tcp_listener.cc:93
int SymbianDeviceTcpSetNoDelay(NativeTcpClient *client, bool enabled)
Definition native_tcp_client.cc:96
int SymbianDeviceTcpListen(unsigned address, unsigned port, bool share_with_workers, NativeTcpListener **output)
Definition native_tcp_client.cc:165
int SymbianDeviceActiveTcpListen(unsigned address, unsigned port, bool share_with_workers, void *context, NativeAcceptCallback callback, NativeActiveTcpListener **output)
Definition native_active_tcp_listener.cc:60
int SymbianDeviceTcpReceive(NativeTcpClient *client, unsigned char *bytes, int capacity, int *received, std::int64_t deadline)
Definition native_tcp_client.cc:275
uint32_t address
Definition exports.cc:69
std::string_view bytes
Definition exports.cc:74
Definition native_active_tcp_listener.cc:10
Definition native_tcp_client.cc:19
Definition native_tcp_client.cc:25