forked from yaqwsx/nativescript-simple-networking
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.ios.ts
62 lines (48 loc) · 1.6 KB
/
index.ios.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import {Address4} from "ip-address";
export class UdpServer {
public onPacket: {(sender: Address4, packet: string): void;};
public onError: {(id: number, message: string): void;};
public onFinished: {(id: number): void;};
public start(port: number): number {
throw "Not implemented";
}
public stop(): number {
throw "Not implemented";
}
public send(address: Address4, packet: string): number;
public send(address: string, packet: string): number;
public send(address: any, packet: string): number {
throw "Not implemented";
}
public getNativeSocket(): java.net.DatagramSocket {
throw "Not implemented";
}
}
export class TcpClient {
public onData: {(data: string): void;};
public onError: {(id: number, message: string): void;};
public onFinished: {(id: number): void;};
public start(servername: string, port: number): number {
throw "Not implemented"; }
public stop(): number {
throw "Not implemented";
}
public send(data: string): number {
throw "Not implemented";
}
}
export class TcpServer {
public onClient: {(client: Address4): void;};
public onData: {(client: Address4, data: string): void;};
public onError: {(id: number, client: Address4, message: string): void;};
public onFinished: {(id: number): void;};
public start(port: number): number {
throw "Not implemented";
}
public stop(): number {
throw "Not implemented";
}
public send(client: Address4, data: string): number {
throw "Not implemented";
}
}