This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Faster split method, the only alternative within lua is using gsub, which | |
// is insanely slower. This function will actually return strings on the stack, | |
// so {str:split(d)} can be used to collect the return values in a table | |
// | |
// A more memory effecient use would be to use string.fsplit rather than using | |
// a table construct | |
// | |
// this avoids extra memory bloat and will keep the resulting strings on the stack | |
// | |
// Build: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
"""Simple server using epoll.""" | |
from __future__ import print_function | |
from contextlib import contextmanager | |
import socket | |
import select | |