Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hwajin
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
이 화진
hwajin
Commits
00d60b2a
Commit
00d60b2a
authored
4 years ago
by
이 화진
Browse files
Options
Downloads
Patches
Plain Diff
Add new file
parent
d367df2c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
simpleChatting/comn.h
+35
-0
35 additions, 0 deletions
simpleChatting/comn.h
with
35 additions
and
0 deletions
simpleChatting/comn.h
0 → 100644
+
35
−
0
View file @
00d60b2a
#include
<stdio.h>
#include
<string.h>
#include
<stdlib.h>
#include
<unistd.h>
#include
<signal.h>
#include
<sys/types.h>
#include
<sys/ipc.h>
#include
<sys/shm.h>
#define MAX_USER_CNT 2
#define MAX_USER_NAME 10
#define MAX_CHAT_LENGTH 255
int
isServerConn
=
-
1
;
int
shmid
=
0
;
void
*
shmaddr
=
NULL
;
struct
shmid_ds
info
;
typedef
struct
UserData
{
int
pid
;
char
name
[
MAX_USER_NAME
];
}
UserData
;
typedef
struct
SharedData
{
int
pid
;
UserData
user
[
MAX_USER_CNT
];
}
SharedData
;
typedef
struct
MessageData
{
int
send_pid
;
char
content
[
MAX_CHAT_LENGTH
];
}
MsgData
;
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment