Warning: session_start(): open(/var/lib/php/sessions/sess_kjn3dmhrtm37rti93b1phdia92, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
// assumes hello message has not been read yet
static DialogIO replaceHelloMessage(final DialogIO io, final S newMsg) {
io.readLine(); // read old hello msg
ret new DialogIO() {
bool sent;
// delegate all but readLineImpl()
boolean isStillConnected() { ret io.isStillConnected(); }
boolean isLocalConnection() { ret io.isLocalConnection(); }
Socket getSocket() { ret io.getSocket(); }
void close() { io.close(); }
void sendLine(String line) { io.sendLine(line); }
String readLineImpl() {
if (!sent) {
sent = true;
ret newMsg;
}
ret io.readLine();
}
};
}