本文整理汇总了C#中KBEngine.MemoryStream.readBlob方法的典型用法代码示例。如果您正苦于以下问题:C# MemoryStream.readBlob方法的具体用法?C# MemoryStream.readBlob怎么用?C# MemoryStream.readBlob使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KBEngine.MemoryStream
的用法示例。
在下文中一共展示了MemoryStream.readBlob方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Client_onLoginSuccessfully
/*
登录loginapp成功了
*/
public void Client_onLoginSuccessfully(MemoryStream stream)
{
var accountName = stream.readString();
username = accountName;
baseappIP = stream.readString();
baseappPort = stream.readUint16();
Dbg.DEBUG_MSG("KBEngine::Client_onLoginSuccessfully: accountName(" + accountName + "), addr(" +
baseappIP + ":" + baseappPort + "), datas(" + _serverdatas.Length + ")!");
_serverdatas = stream.readBlob();
login_baseapp(true);
}
示例2: Client_onLoginFailed
/*
登录loginapp失败了
*/
public void Client_onLoginFailed(MemoryStream stream)
{
UInt16 failedcode = stream.readUint16();
_serverdatas = stream.readBlob();
Dbg.ERROR_MSG("KBEngine::Client_onLoginFailed: failedcode(" + failedcode + "), datas(" + _serverdatas.Length + ")!");
Event.fireAll("onLoginFailed", new object[]{failedcode});
}
示例3: Client_onCreateAccountResult
/*
账号创建返回结果
*/
public void Client_onCreateAccountResult(MemoryStream stream)
{
UInt16 retcode = stream.readUint16();
byte[] datas = stream.readBlob();
Event.fireOut("onCreateAccountResult", new object[]{retcode, datas});
if(retcode != 0)
{
Dbg.WARNING_MSG("KBEngine::Client_onCreateAccountResult: " + username + " create is failed! code=" + retcode + "!");
return;
}
Dbg.DEBUG_MSG("KBEngine::Client_onCreateAccountResult: " + username + " create is successfully!");
}
示例4: onImportServerErrorsDescr
/*
服务端错误描述导入了
*/
public void onImportServerErrorsDescr(MemoryStream stream)
{
UInt16 size = stream.readUint16();
while(size > 0)
{
size -= 1;
ServerErr e;
e.id = stream.readUint16();
e.name = System.Text.Encoding.UTF8.GetString(stream.readBlob());
e.descr = System.Text.Encoding.UTF8.GetString(stream.readBlob());
serverErrs.Add(e.id, e);
//Dbg.DEBUG_MSG("Client_onImportServerErrorsDescr: id=" + e.id + ", name=" + e.name + ", descr=" + e.descr);
}
}
示例5: createFromStream
public override object createFromStream(MemoryStream stream)
{
return stream.readBlob();
}