UV/Handle/TCP.pm untested

filter: Statementstmt n/a Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a SCAR -
1 package SPVM::UV::Handle::TCP;
2  
3  
4  
5 1;
6  
7 =encoding utf8
8  
9 =head1 Name
10  
11 SPVM::UV::Handle::TCP - TCP Handle for libuv
12  
13 =head1 Description
14  
15 C<UV::Handle::TCP> in L<SPVM> represents the TCP handle for L<libuv|https://libuv.org/>, corresponding to the C<uv_tcp_t> structure.
16  
17 =head1 Super Class
18  
19 L<UV::Handle::Stream|SPVM::UV::Handle::Stream>
20  
21 =head1 Usage
22  
23 use UV::Handle::TCP;
24
25 my $tcp = UV::Handle::TCP->new;
26  
27 =head1 Class Methods
28  
29 =head2 new
30  
31 C<static method new : L<UV::Handle::TCP|SPVM::UV::Handle::TCP> ();>
32  
33 Creates a new L<UV::Handle::TCP|SPVM::UV::Handle::TCP> object, and returns it.
34  
35 =head1 Instance Methods
36  
37 =head2 open
38  
39 C<method open : void ($fd : int);>
40  
41 Associates an existing file descriptor C<$fd> with the TCP handle.
42  
43 This method calls the L<uv_tcp_open|https://docs.libuv.org/en/v1.x/tcp.html#c.uv_tcp_open> function.
44  
45 Exceptions:
46  
47 If uv_tcp_open fails, an exception is thrown.
48  
49 =head1 Copyright & License
50  
51 Copyright (c) 2026 Yuki Kimoto
52  
53 MIT License