mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-28 10:13:56 +00:00
make proc names consistent (#18626)
* rename `endswith` to `endsWith` * rename
This commit is contained in:
@@ -34,7 +34,7 @@ proc readMessages(client: AsyncFD) {.async.} =
|
||||
clientCount.inc
|
||||
break
|
||||
else:
|
||||
if line.startswith("Message "):
|
||||
if line.startsWith("Message "):
|
||||
msgCount.inc
|
||||
else:
|
||||
doAssert false
|
||||
|
||||
@@ -59,7 +59,7 @@ proc readMessages(server: AsyncSocket) {.async.} =
|
||||
while i < maxResponses:
|
||||
let (data, fromIp, fromPort) = await recvFrom(server, 16384)
|
||||
|
||||
if data.startswith("Message ") and fromIp == "127.0.0.1":
|
||||
if data.startsWith("Message ") and fromIp == "127.0.0.1":
|
||||
await sendTo(server, fromIp, fromPort, data)
|
||||
|
||||
inc(msgCount)
|
||||
|
||||
@@ -36,7 +36,7 @@ when defined(ssl):
|
||||
inc(clientCount)
|
||||
break
|
||||
else:
|
||||
if line.startswith("Message "):
|
||||
if line.startsWith("Message "):
|
||||
inc(msgCount)
|
||||
else:
|
||||
doAssert false
|
||||
|
||||
@@ -81,7 +81,7 @@ proc readMessages(server: AsyncFD) {.async.} =
|
||||
addr(slen))
|
||||
size = 0
|
||||
var grammString = $cstring(addr buffer)
|
||||
if grammString.startswith("Message ") and
|
||||
if grammString.startsWith("Message ") and
|
||||
saddr.sin_addr.s_addr == nativesockets.ntohl(INADDR_LOOPBACK.uint32):
|
||||
await sendTo(server, addr grammString[0], len(grammString),
|
||||
cast[ptr SockAddr](addr saddr), slen)
|
||||
|
||||
@@ -220,7 +220,7 @@ when defined(windows):
|
||||
clientCount.inc
|
||||
break
|
||||
else:
|
||||
if line.startswith("Message "):
|
||||
if line.startsWith("Message "):
|
||||
msgCount.inc
|
||||
else:
|
||||
doAssert false
|
||||
|
||||
Reference in New Issue
Block a user