Skip to content

Commit bb6ad9e

Browse files
committed
minor edits
1 parent 68cece6 commit bb6ad9e

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

lightbug_http/sys/net.mojo

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ fn getaddrinfo[
8282
@value
8383
struct SysListener:
8484
"""
85-
TCP server that listens for incoming connections.
85+
A TCP listener that listens for incoming connections and can accept them.
8686
"""
8787

8888
var fd: c_int
@@ -272,10 +272,11 @@ struct addrinfo_macos(AnAddrInfo):
272272

273273
fn get_ip_address(self, host: String) raises -> in_addr:
274274
"""
275-
Get IP address from host.
275+
Returns an IP address based on the host.
276+
This is a MacOS-specific implementation.
276277
277278
Args:
278-
host: String - The host to get IP from.
279+
host: String - The host to get the IP from.
279280
280281
Returns:
281282
UInt32 - The IP address.
@@ -337,7 +338,8 @@ struct addrinfo_unix(AnAddrInfo):
337338

338339
fn get_ip_address(self, host: String) raises -> in_addr:
339340
"""
340-
Get IP address from host.
341+
Returns an IP address based on the host.
342+
This is a Unix-specific implementation.
341343
342344
Args:
343345
host: String - The host to get IP from.
@@ -380,7 +382,8 @@ struct addrinfo_unix(AnAddrInfo):
380382

381383

382384
fn create_connection(sock: c_int, host: String, port: UInt16) raises -> SysConnection:
383-
"""Connect to a server using a socket.
385+
"""
386+
Connect to a server using a socket.
384387
385388
Args:
386389
sock: Int32 - The socket file descriptor.

lightbug_http/sys/server.mojo

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ from lightbug_http.strings import next_line, NetworkType
1313

1414
struct SysServer:
1515
"""
16-
Server that accept request and deliver HTTP services.
16+
A Mojo-based server that accept incoming requests and delivers HTTP services.
1717
"""
1818

1919
var error_handler: ErrorHandler
@@ -47,8 +47,8 @@ struct SysServer:
4747

4848
fn get_concurrency(self) -> Int:
4949
"""
50-
Get the concurrency level which is either :
51-
The configured max_concurrent_connections or the DefaultConcurrency.
50+
Retrieve the concurrency level which is either
51+
the configured max_concurrent_connections or the DefaultConcurrency.
5252
5353
Returns:
5454
Int: concurrency level for the server.

0 commit comments

Comments
 (0)