本文整理汇总了C#中KBEngine.Bundle.writeString方法的典型用法代码示例。如果您正苦于以下问题:C# Bundle.writeString方法的具体用法?C# Bundle.writeString怎么用?C# Bundle.writeString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KBEngine.Bundle
的用法示例。
在下文中一共展示了Bundle.writeString方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: onReConnectTo_baseapp_callback
private void onReConnectTo_baseapp_callback(string ip, int port, bool success, object userData)
{
if(!success)
{
Dbg.ERROR_MSG(string.Format("KBEngine::reLoginBaseapp(): connect {0}:{1} is error!", ip, port));
return;
}
Dbg.DEBUG_MSG(string.Format("KBEngine::relogin_baseapp(): connect {0}:{1} is successfully!", ip, port));
Bundle bundle = new Bundle();
bundle.newMessage(Message.messages["Baseapp_reLoginBaseapp"]);
bundle.writeString(username);
bundle.writeString(password);
bundle.writeUint64(entity_uuid);
bundle.writeInt32(entity_id);
bundle.send(_networkInterface);
}
示例2: bindAccountEmail
/*
绑定Email,通过baseapp
*/
public void bindAccountEmail(string emailAddress)
{
Bundle bundle = new Bundle();
bundle.newMessage(Message.messages["Baseapp_reqAccountBindEmail"]);
bundle.writeInt32(entity_id);
bundle.writeString(password);
bundle.writeString(emailAddress);
bundle.send(_networkInterface);
}
示例3: resetpassword_loginapp
/*
重置密码, 通过loginapp
*/
public void resetpassword_loginapp(bool noconnect)
{
if(noconnect)
{
reset();
_networkInterface.connectTo(_args.ip, _args.port, onConnectTo_resetpassword_callback, null);
}
else
{
Bundle bundle = new Bundle();
bundle.newMessage(Message.messages["Loginapp_reqAccountResetPassword"]);
bundle.writeString(username);
bundle.send(_networkInterface);
}
}
示例4: login_loginapp
/*
登录到服务端(loginapp), 登录成功后还必须登录到网关(baseapp)登录流程才算完毕
*/
public void login_loginapp(bool noconnect)
{
if(noconnect)
{
reset();
_networkInterface.connectTo(_args.ip, _args.port, onConnectTo_loginapp_callback, null);
}
else
{
Dbg.DEBUG_MSG("KBEngine::login_loginapp(): send login! username=" + username);
Bundle bundle = new Bundle();
bundle.newMessage(Message.messages["Loginapp_login"]);
bundle.writeInt8((sbyte)_args.clientType);
bundle.writeBlob(KBEngineApp.app._clientdatas);
bundle.writeString(username);
bundle.writeString(password);
bundle.send(_networkInterface);
}
}
示例5: newPassword
/*
设置新密码,通过baseapp, 必须玩家登录在线操作所以是baseapp。
*/
public void newPassword(string old_password, string new_password)
{
Bundle bundle = new Bundle();
bundle.newMessage(Message.messages["Baseapp_reqAccountNewPassword"]);
bundle.writeInt32(entity_id);
bundle.writeString(old_password);
bundle.writeString(new_password);
bundle.send(_networkInterface);
}
示例6: hello
/*
与服务端握手,与任何一个进程连接之后应该第一时间进行握手
*/
public void hello()
{
Bundle bundle = new Bundle();
if(currserver == "loginapp")
bundle.newMessage(Message.messages["Loginapp_hello"]);
else
bundle.newMessage(Message.messages["Baseapp_hello"]);
bundle.writeString(clientVersion);
bundle.writeString(clientScriptVersion);
bundle.writeBlob(_encryptedKey);
bundle.send(_networkInterface);
}
示例7: login_baseapp
/*
登录到服务端,登录到网关(baseapp)
*/
public void login_baseapp(bool noconnect)
{
if(noconnect)
{
Event.fireOut("onLoginBaseapp", new object[]{});
_networkInterface.reset();
_networkInterface = new NetworkInterface();
_networkInterface.connectTo(baseappIP, baseappPort, onConnectTo_baseapp_callback, null);
}
else
{
Bundle bundle = new Bundle();
bundle.newMessage(Message.messages["Baseapp_loginBaseapp"]);
bundle.writeString(username);
bundle.writeString(password);
bundle.send(_networkInterface);
}
}
示例8: bindEMail_baseapp
public void bindEMail_baseapp()
{
Bundle bundle = new Bundle();
bundle.newMessage(Message.messages["Baseapp_reqAccountBindEmail"]);
bundle.writeInt32(entity_id);
bundle.writeString(password);
bundle.writeString("[email protected]");
bundle.send(networkInterface_);
}
示例9: createAccount_loginapp
/*
创建账号,通过loginapp
*/
public void createAccount_loginapp(bool noconnect)
{
if(noconnect)
{
reset();
_networkInterface.connectTo(_args.ip, _args.port, onConnectTo_createAccount_callback, null);
}
else
{
Bundle bundle = new Bundle();
bundle.newMessage(Message.messages["Loginapp_reqCreateAccount"]);
bundle.writeString(username);
bundle.writeString(password);
bundle.writeBlob(KBEngineApp.app._clientdatas);
bundle.send(_networkInterface);
}
}
示例10: resetpassword_loginapp
public bool resetpassword_loginapp(bool noconnect)
{
if(noconnect)
{
reset();
if(!networkInterface_.connect(ip, port))
{
Dbg.ERROR_MSG(string.Format("KBEngine::resetpassword_loginapp(): connect {0}:{1} is error!", ip, port));
return false;
}
onOpenLoginapp_resetpassword();
Dbg.DEBUG_MSG(string.Format("KBEngine::resetpassword_loginapp(): connect {0}:{1} is successfylly!", ip, port));
}
else
{
Bundle bundle = new Bundle();
bundle.newMessage(Message.messages["Loginapp_reqAccountResetPassword"]);
bundle.writeString(username);
bundle.send(networkInterface_);
}
return true;
}
示例11: login_loginapp
public bool login_loginapp(bool noconnect)
{
if(noconnect)
{
reset();
if(!networkInterface_.connect(loginappIP, loginappPort))
{
Dbg.ERROR_MSG(string.Format("KBEngine::login_loginapp(): connect {0}:{1} is error!", loginappIP, loginappPort));
return false;
}
onLogin_loginapp();
Dbg.DEBUG_MSG(string.Format("KBEngine::login_loginapp(): connect {0}:{1} is successfylly!", loginappIP, loginappPort));
}
else
{
Dbg.DEBUG_MSG("KBEngine::login_loginapp(): send login! username=" + username);
Bundle bundle = new Bundle();
bundle.newMessage(Message.messages["Loginapp_login"]);
bundle.writeInt8(3); // clientType
bundle.writeBlob(new byte[0]);
bundle.writeString(username);
bundle.writeString(password);
bundle.send(networkInterface_);
}
return true;
}
示例12: login_baseapp
public bool login_baseapp(bool noconnect)
{
if(noconnect)
{
Event.fire("login_baseapp", new object[]{});
if(!networkInterface_.connect(ip, port))
{
Dbg.ERROR_MSG(string.Format("KBEngine::login_baseapp(): connect {0}:{1} is error!", ip, port));
return false;
}
onLogin_baseapp();
Dbg.DEBUG_MSG(string.Format("KBEngine::login_baseapp(): connect {0}:{1} is successfylly!", ip, port));
}
else
{
Bundle bundle = new Bundle();
bundle.newMessage(Message.messages["Baseapp_loginGateway"]);
bundle.writeString(username);
bundle.writeString(password);
bundle.send(networkInterface_);
}
return true;
}
示例13: hello
public void hello()
{
Bundle bundle = new Bundle();
if(currserver_ == "loginapp")
bundle.newMessage(Message.messages["Loginapp_hello"]);
else
bundle.newMessage(Message.messages["Baseapp_hello"]);
bundle.writeString(clientVersion_);
bundle.writeBlob(clientdatas_);
bundle.send(networkInterface_);
}
示例14: addToStream
public override void addToStream(Bundle stream, object v)
{
stream.writeString(Convert.ToString(v));
}