This file contains hidden or 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
--- a/common/network/Utils.hpp | |
+++ b/common/network/Utils.hpp | |
@@ -58,8 +58,8 @@ namespace network { | |
template<> | |
inline std::string GetSerializedValue(const std::string& t) | |
{ | |
- size_t size = t.size(); | |
- return ConvertEndian(std::string(reinterpret_cast<const char*>(&size), sizeof(size_t))) + | |
+ int size = t.size(); | |
+ return ConvertEndian(std::string(reinterpret_cast<const char*>(&size), sizeof(int))) + |
This file contains hidden or 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
defmodule Chat.Client do | |
# In all of the following functions 'server' stands for the server's pid | |
def join(server) do | |
send server, :join | |
end | |
def say(server, message) do | |
send server, { :say, message } | |
end | |