make proc names consistent (#18626)
* rename `endswith` to `endsWith` * rename
This commit is contained in:
parent
916d0c21af
commit
2bc07554cc
9 changed files with 13 additions and 13 deletions
|
|
@ -40,7 +40,7 @@ proc readMessages(client: AsyncFD) {.async.} =
|
|||
clientCount.inc
|
||||
break
|
||||
else:
|
||||
if line.startswith("Message "):
|
||||
if line.startsWith("Message "):
|
||||
msgCount.inc
|
||||
else:
|
||||
doAssert false
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue