add send \n

This commit is contained in:
chuanweizhang2013 2014-03-16 17:32:08 +08:00
parent 1cf064a7d7
commit b44b5ce52f
2 changed files with 4 additions and 1 deletions

View File

@ -385,6 +385,8 @@ bool FileServer::recv_file(int fd)
fwrite(fullfilename, sizeof(char), length,fp);
}
fclose(fp);
string finish("finish\n");
send(fd, finish.c_str(), finish.size(),0);
return true;
}
@ -536,6 +538,7 @@ public:
void onRuntimeVersion(int fd, const std::string &args)
{
string runtimeVer=getRuntimeVersion();
runtimeVer += "\n";
send(fd, runtimeVer.c_str(), runtimeVer.size(),0);
}

View File

@ -41,7 +41,7 @@ local function main()
local frameHeight = 95
-- create dog animate
local textureDog = cc.TextureCache:getInstance():addImage("res/dog.png")
local textureDog = cc.Director:getInstance():getTextureCache():addImage("res/dog.png")
local rect = cc.rect(0, 0, frameWidth, frameHeight)
local frame0 = cc.SpriteFrame:createWithTexture(textureDog, rect)
rect = cc.rect(frameWidth, 0, frameWidth, frameHeight)