Skip to content

How to decode from socket... #3

Description

@Gaojianli

Hello, thanks for your excellent working... I am trying to develop a file server by using this project, but it is a little confusing about how to decode the file from the socket. I write the following code but it seems not working:

char buf[500]
int ret = 0;
int session_num=0;
int index = 0;
while (ret == 0){
        read(sockfd,buf,500);
        ret = m_lt_code->receiveAndDecode(200,buf,session_num,index);
}
m_lt_code->WriteFile("/tmp/test.png",session_num);

Could you please give me a example? Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions