No money to eat tnnd depressed

Source: Internet
Author: User

The money is completely spent today!

One day tomorrow will be an indecisive day! After the QQ signature was changed to "no money to eat", two high school students immediately sent a common feeling.

He Lin 18:11:34
I have no money to eat.
This guy is very lazy. 18:11:25.
Depend
This guy is very lazy. 18:11:37.
Depressed
He Lin 18:11:59
Mom is depressed.
He Lin 18:12:16
Ready to sell
,,,,,

Wu Wei (18:12:26)
You have no money to eat.
Wu Wei (18:12:18)
Why is it the same as me?

,,,,,,,,,,,,,,

It seems like they're all the same. Haha

The basic framework of the server is basically fixed.

We will discuss the specific implementation tomorrow and the day after tomorrow.

The framework and interface must be completed this week, and the CODE will begin next week.

Today, I wrote the interface for saving the SOCKET class of online users.

The following is to thoroughly analyze the program structure and specify the required interface.

Store the data structure of the online customer's SOCKET

A Data Structure is also defined here to save the SOCKET of the current online user.

When a user goes online, he or she should save his or her SOCKET in this structure when the login is successful,

When the user goes offline, the SOCKET in this structure should be deleted,

When the client communicates with each other, it needs to query the SOCKET to be sent based on the ID in the message, and then forward the data in the message;

I plan to use a class to implement pseudo code for this structure as follows:

Class COnlineSocket

{

Public:

COnlineSocket ();

~ COnlineSocket ();

BOOL AddSocket (); // Save the SOCKET when the user logs on

SOCKET FindSocket (bID); // more ID to find its SOCKET

BOOL DeleteSocket (bID); // The user deletes the SOCKET from offline.

Private:

Struct SocketOnline

{

Int Bid;

SOCKET m_socket;

} SocketOnline [1000];

 

};

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.