GroupTask
A daily task management IOS app allowing user assign tasks to peers and provide service to others by using Swift. Published at Apple Store.
A web registration system for USC students to plan their future course of study by using UNIX socket.
A course registration system for USC students to view their future course of study by using UNIX socket.
YOU ARE NOT ALLOWED to take this project as a reference or look at any files under this directory.
Please be aware that this project is recorded in Turnitin, and taking any code to your submission, will result in academic misconduct.
The author of this project will NOT be responsible for any consequence.
Nicholas Shen
client.c:
For user login by entering correct username and password withing 3 attempts and then query any category of a specific course or ask for mutiple course infomation with serverM via TCP.
serverM.c:
Receive user credentials via TCP and then encrypt those info to verify user’s identity from serverC; Receive user query requests and then reply with results retrieved from correct department server(s) via UDP.
serverC.c:
Receive user credentials from serverM and send feedback to serverM via UDP.
serverEE.c:
Receive user query requests about EE department from serverM and send query results to serverM via UDP.
serverCS.c:
Receive user query requests about CS department from serverM and send query results to serverM via UDP.
header.h:
Header file: import libaries, define constants and data structures.
Makefile:
Compile or clean executable files: client serverM serverC serverEE serverCS.
README.md:
This file.
Others:
To make servers run correctly, cred.txt, cs.txt, and ee.txt are needed.
Message | Format | Who Use? |
---|---|---|
ServerM | struct ServerM{ int sd_tcp; int sd_udp; int connected_sd_tcp; struct sockaddr_in addr_ServerC; struct sockaddr_in addr_ServerEE; struct sockaddr_in addr_ServerCS; } | client <-> serverM <-> serverEE and serverCS |
User_auth | struct User_auth{ char userName[BUFFSIZE]; char userPsw[BUFFSIZE]; } | client <-> serverM <-> serverC |
User_query | struct User_auth{ char course[BUFFSIZECOURSE]; char category[BUFFSIZECOURSE]; } | client <-> serverM <-> serverEE and serverCS |
authFeedback/fbcode/code | char authFeedback[FEEDBACKSIZE] (“101”: Username does not exist; “102”: Password does not match; “103”: Authentication is successful) | client <-> serverM <-> serverC |
Muti query | struct User_auth{ char course[BUFFSIZECOURSE]; char category == “!muti!”; } | client <-> serverM <-> serverEE and serverCS |
Muti query lists | char courselist[MUTIQUERYSIZE][courseinfosize]; } | serverM <- serverEE and serverCS |
Muti query results | char courseinfos[MUTIQUERYSIZE][courseinfosize]; } | client <-> serverM <-> serverEE and serverCS |
N/A
In terminal, type make
.
Run: ./serverM
, ./serverC
, ./serverEE
, ./serverCS
, ./client
.
[USER NAME] (5-50 characters) enter
[USER PASSWORD] (5-50 characters)enter
[COURSECODE] (1-128 characters) enter
[CATEGORY] (1-128 characters) enter
Please enter the course code to query: (2-10 course codes, followed by a single blank)
CS100 CS310 CS561 CS356 EE450 CS435 EE658 EE608 EE604 EE520
See cs.txt for example, see serverM.c for how to encrypt passwords.
If it is necessary or inadvertent to bring this project to the public (e.x. personal project demo), the author adhere followings:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.