Skip to content
/ soQet Public

Prototype of primitive chat-room, concerning socket programming.

License

Notifications You must be signed in to change notification settings

X-wenhao/soQet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

soQet

Prototype of primitive chat-room, concerning socket programming.


Tasks

Login Module

测试用账号密码

Account Password
user 123456

ps 可以直接调用signinUser()方法注册一个

PS $PROJECT_LOCATION/soQet > python3
......
>>> from globalvar import *
>>> from utils.user_utils import signinUser
>>> signinUser(id, passwd)
True
>>>

Back-End

  • 用户登陆
    • 注册??
  • 账号密码在数据库中的存储
  • 用户在线状态实现方法:
    • 对其他用户(是否可以开启小窗口?离线未接收的消息)
    • 对服务器(安全考虑,禁止未注册人员登陆)

Front-End

  • 登陆(注册)页面
    • 表单提交(非空检查
  • Toast Msg - 弹出式消息提醒

Chat Module

Back-End


Task Apportion

to be filled
。。。。

API & Regulation

API

  • @login_verification
    app.route()之后调用,防止未授权的行为

Regulations

聊天内容

chat_msg = {
    "name": "smdsbz",
    "mime": "text",         // 标志content里面的数据类型,除了text还可以是pic(图片)等
    "content": "大家都动起来啊\\托腮",
    "time_stamp": 123456789
}

注释格式

def functionName(user_id, user_passwd):
    '''
    这个函数是干啥的

    ARGS:
        user_id 简要阐述这个参数是啥,i.e.怎么调用
        user_passwd

    RETURN:
        若有,申明返回数据的内容及格式
    '''
    pass
class ClassName():
    '''
    这个类是干啥的
    '''
    # 只需要写封装之后的内容

    ' ARGS '
    ...

    ' FUNCTIONS '
    # 注释格式同上
    ...

References & Bibliographies

  • 廖雪峰教程:
  • RTFM:
    • On Windows:
      PS $CUR_DIR> python
    • On OS X or other *nix systems:
      → python3
    • And then enter:
     Python 3.6.1 ...
     ......
     >>> import socket
     >>> help(socket)
    

About

Prototype of primitive chat-room, concerning socket programming.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published