Homework 2 – Bulletin Board System: Part 2 solved

$40.00

Category: You will receive a download link of the .ZIP file upon Payment

Description

Rate this product

Intro. to Network Programming
Description
Continuing the first part, you are asking to implement the functions of the Bulletin Board System (BBS) server.
Requirement
The service accepts the following commands and at least 10 clients:
When client enter command incompletely E.g., missing parameters, the server should show command format for client.
Command format Description Result
create-board Create a board which named .
must be unique.
If Board’s name is already used, show failed
message, otherwise it is success.
Must be logged in when creating board’s
name
Success Create board successfully.
Fail (1) Board already exist.
Fail (2) Please login first.
create-post –title <br /> –content <content><br /> (command is in the same line )<br /> Create a post which title is <title> and content<br /> is <content>.<br /> Use –title and –content to separate titles and<br /> content.<br /> <tilte> can have space but only in one line.<br /> <content> can have space, and key in <br /> to<br /> indicate a new line.<br /> Success Create post successfully.<br /> Fail (1) Board does not exist.<br /> Fail (2) Please login first.<br /> list-board ##<key> List all boards in BBS.<br /> <key> is a keyword, use ## <key> to do<br /> advanced query.<br /> Index Name Moderator<br /> <Index1> <Name1> <Moderator1><br /> list-post <board-name> ##<key> List all posts in a board named <board-name><br /> <key> is a keyword, use ## <key> to do<br /> advanced query.<br /> Success<br /> ID Title Author Date<br /> <ID1> <Title1> <Author1> <Date1><br /> Fail Board does not exist.<br /> read <post-id> Show the post which ID is <post-id>. Success Author :<Author1><br /> Title :<Title1><br /> Date :<Date1><br /> —<br /> <content><br /> —<br /> <User1> : <Comment1><br /> Fail Post does not exist.<br /> delete-post <post-id> Delete the post which ID is <post-id>.<br /> Only the post owner can delete the post.<br /> If the user is not the post owner, show failed<br /> message, otherwise it is success.<br /> Success Delete successfully.<br /> Fail (1) Please login first.<br /> Fail (2) Post does not exist.<br /> Fail (3) Not the post owner.<br /> update-post <post-id> –title/content<br /> <new><br /> Update the post which ID is <post-id>.<br /> Use — to decide which to modify, title or<br /> content, and replaced by <new>.<br /> Only the post owner can update the post.<br /> If the user is not the post owner, show failed<br /> message, otherwise it is success.<br /> Success Update successfully.<br /> Fail (1) Please login first.<br /> Fail (2) Post does not exist.<br /> Fail (3) Not the post owner.<br /> comment <post-id> <comment> Leave a comment < comment > at the post<br /> which ID is <post-id> Success Comment successfully.<br /> Fail (1) Please login first.<br /> Fail (2) Post does not exist.<br /> exit Close connection.<br /> Scenario<br /> bash$ telnet 127.0.0.1 7890<br /> ********************************<br /> ** Welcome to the BBS server. **<br /> % create-board NP_HW<br /> Please login first.<br /> % register Bob bob@qwer.asdf 123456<br /> Register successfully.<br /> % register Sam sam@qwer.com 654321<br /> Register successfully.<br /> % login Bob 123456<br /> Welcome, Bob.<br /> % create-board NP_HW<br /> Create board successfully.<br /> % create-board NP_HW<br /> Board already exist.<br /> % create-board OS_HW<br /> Create board successfully.<br /> % create-board FF<br /> Create board successfully.<br /> % list-board<br /> Index Name Moderator<br /> 1 NP_HW Bob<br /> 2 OS_HW Bob<br /> 3 FF_HW Bob<br /> % list-board ##HW<br /> Index Name Moderator<br /> 1 NP_HW Bob<br /> 2 OS_HW Bob<br /> % create-post NCTU –title About NP HW_2 –content Help!<br />I have some problem!<br /> Board does not exist.<br /> % create-post NP_HW –title About NP HW_2 –content Help!<br />I have some problem!<br /> Create post successfully.<br /> % create-post NP_HW –title HW_3 –content Ask!<br />Is NP HW_3 Released?<br /> Create post successfully.<br /> % list-post NP<br /> Board does not exist.<br /> % list-post NP_HW<br /> % list-post NP_HW ##HW_2</p> <p>% read 888<br /> Post does not exist.<br /> % read 1<br /> Author :Bob<br /> Title :About NP HW_2<br /> Date :2020-03-31<br /> —<br /> Help!<br /> I have some problem!<br /> —<br /> % update-post 888 –title NP HW_2<br /> Post does not exist.<br /> % update-post 1 –title NP HW_2<br /> Update successfully.<br /> % read 1<br /> Author :Bob<br /> Title :NP HW_2<br /> Date :2020-03-31<br /> —<br /> Help!<br /> I have some problem!<br /> —<br /> % logout<br /> Bye, Bob.<br /> % login Sam 654321<br /> Welcome, Sam.<br /> % update-post 1 –content Ha!<br />ha!<br />ha!<br /> Not the post owner.<br /> % delete-post 1<br /> Not the post owner.<br /> % comment 888 Ha! ha! ha!<br /> Post does not exist.<br /> % comment 1 Ha! ha! ha!<br /> Comment successfully.<br /> % read 1<br /> Author :Bob<br /> Title :NP HW_2<br /> Date :2020-03-31<br /> —<br /> Help!<br /> I have some problem!<br /> —<br /> Sam: Ha! ha! ha!<br /> % create-board Hello<br /> Create board successfully.<br /> % list-board<br /> Index Name Moderator<br /> 1 NP_HW Bob<br /> 2 OS_HW Bob<br /> 3 FF_HW Bob<br /> 4 Hello Sam<br /> % logout<br /> Bye, Sam.<br /> % login Bob 123456<br /> Welcome, Bob.<br /> % delete-post 1<br /> Delete successfully.<br /> % read 1<br /> Post does not exist.<br /> % logout<br /> Bye, Bob.<br /> % exit<br /> Grade (100%)<br /> ⚫ create-board command. – (10%)<br /> ⚫ create-post command. – (20%)<br /> ⚫ list-board command. – (15%)<br /> ⚫ list-post command. – (15%)<br /> ⚫ read command. – (10%)<br /> ⚫ delete-post command. – (10%)<br /> ⚫ update-post command. – (10%)<br /> ⚫ comment command. – (10%)<br /> Submission<br /> Please upload a zip file called “hw2_{$student_id}.zip” that includes your source code. Submission that don’t follow the rule<br /> will get 20% punishment on the grade.<br /> You will get 0 points on this project for plagiarism. Please don’t copy-paste any code!<br /> Note<br /> You will be asked to use AWS resources in projects 3 and 4, so we suggest you use AWS SDK supported languages to<br /> implement this project.<br /> Reference<br /> 1. C/C++ Socket<br /> 2. SQLite C/C++ Interface<br /> 3. Linux socket SELECT<br /> 4. AWS SDK supported languages</p> </div> </div> <section class="related products"> <h2>Related products</h2> <ul class="products columns-3"> <li class="product type-product post-12770 status-publish first instock product_cat-intro-to-network-programming has-post-thumbnail downloadable virtual purchasable product-type-simple"> <a href="https://codeshive.com/product/homework-4-bulletin-board-system-pub-sub-system-solved/" class="woocommerce-LoopProduct-link woocommerce-loop-product__link"><img width="225" height="225" src="https://codeshive.com/wp-content/uploads/2021/01/download-8.jpg" class="attachment-woocommerce_thumbnail size-woocommerce_thumbnail" alt="" decoding="async" srcset="https://codeshive.com/wp-content/uploads/2021/01/download-8.jpg 225w, https://codeshive.com/wp-content/uploads/2021/01/download-8-100x100.jpg 100w, https://codeshive.com/wp-content/uploads/2021/01/download-8-150x150.jpg 150w" sizes="(max-width: 225px) 100vw, 225px" /><h2 class="woocommerce-loop-product__title">Homework 4 – Bulletin Board System: Pub/Sub system solved</h2> <span class="price"><span class="woocommerce-Price-amount amount"><bdi><span class="woocommerce-Price-currencySymbol">$</span>40.00</bdi></span></span> </a><a href="?add-to-cart=12770" aria-describedby="woocommerce_loop_add_to_cart_link_describedby_12770" data-quantity="1" class="button product_type_simple add_to_cart_button ajax_add_to_cart" data-product_id="12770" data-product_sku="" aria-label="Add to cart: “Homework 4 - Bulletin Board System: Pub/Sub system solved”" rel="nofollow">View This Answer</a><span id="woocommerce_loop_add_to_cart_link_describedby_12770" class="screen-reader-text"> </span> </li> <li class="product type-product post-12768 status-publish instock product_cat-intro-to-network-programming has-post-thumbnail downloadable virtual purchasable product-type-simple"> <a href="https://codeshive.com/product/homework-3-bulletin-board-system-part-3-solved/" class="woocommerce-LoopProduct-link woocommerce-loop-product__link"><img width="225" height="225" src="https://codeshive.com/wp-content/uploads/2021/01/download-8.jpg" class="attachment-woocommerce_thumbnail size-woocommerce_thumbnail" alt="" decoding="async" srcset="https://codeshive.com/wp-content/uploads/2021/01/download-8.jpg 225w, https://codeshive.com/wp-content/uploads/2021/01/download-8-100x100.jpg 100w, https://codeshive.com/wp-content/uploads/2021/01/download-8-150x150.jpg 150w" sizes="(max-width: 225px) 100vw, 225px" /><h2 class="woocommerce-loop-product__title">Homework 3 – Bulletin Board System: Part 3 solved</h2> <span class="price"><span class="woocommerce-Price-amount amount"><bdi><span class="woocommerce-Price-currencySymbol">$</span>40.00</bdi></span></span> </a><a href="?add-to-cart=12768" aria-describedby="woocommerce_loop_add_to_cart_link_describedby_12768" data-quantity="1" class="button product_type_simple add_to_cart_button ajax_add_to_cart" data-product_id="12768" data-product_sku="" aria-label="Add to cart: “Homework 3 - Bulletin Board System: Part 3 solved”" rel="nofollow">View This Answer</a><span id="woocommerce_loop_add_to_cart_link_describedby_12768" class="screen-reader-text"> </span> </li> <li class="product type-product post-12763 status-publish last instock product_cat-intro-to-network-programming has-post-thumbnail downloadable virtual purchasable product-type-simple"> <a href="https://codeshive.com/product/homework-1-bulletin-board-system-part-1-solved/" class="woocommerce-LoopProduct-link woocommerce-loop-product__link"><img width="225" height="225" src="https://codeshive.com/wp-content/uploads/2021/01/download-8.jpg" class="attachment-woocommerce_thumbnail size-woocommerce_thumbnail" alt="" decoding="async" loading="lazy" srcset="https://codeshive.com/wp-content/uploads/2021/01/download-8.jpg 225w, https://codeshive.com/wp-content/uploads/2021/01/download-8-100x100.jpg 100w, https://codeshive.com/wp-content/uploads/2021/01/download-8-150x150.jpg 150w" sizes="(max-width: 225px) 100vw, 225px" /><h2 class="woocommerce-loop-product__title">Homework 1 – Bulletin Board System: Part 1 solved</h2> <span class="price"><span class="woocommerce-Price-amount amount"><bdi><span class="woocommerce-Price-currencySymbol">$</span>40.00</bdi></span></span> </a><a href="?add-to-cart=12763" aria-describedby="woocommerce_loop_add_to_cart_link_describedby_12763" data-quantity="1" class="button product_type_simple add_to_cart_button ajax_add_to_cart" data-product_id="12763" data-product_sku="" aria-label="Add to cart: “Homework 1 - Bulletin Board System: Part 1 solved”" rel="nofollow">View This Answer</a><span id="woocommerce_loop_add_to_cart_link_describedby_12763" class="screen-reader-text"> </span> </li> </ul> </section> <nav class="storefront-product-pagination" aria-label="More products"> <a href="https://codeshive.com/product/homework-1-bulletin-board-system-part-1-solved/" rel="prev"> <img width="225" height="225" src="https://codeshive.com/wp-content/uploads/2021/01/download-8.jpg" class="attachment-woocommerce_thumbnail size-woocommerce_thumbnail" alt="" loading="lazy" /> <span class="storefront-product-pagination__title">Homework 1 - Bulletin Board System: Part 1 solved</span> </a> <a href="https://codeshive.com/product/homework-3-bulletin-board-system-part-3-solved/" rel="next"> <img width="225" height="225" src="https://codeshive.com/wp-content/uploads/2021/01/download-8.jpg" class="attachment-woocommerce_thumbnail size-woocommerce_thumbnail" alt="" loading="lazy" /> <span class="storefront-product-pagination__title">Homework 3 - Bulletin Board System: Part 3 solved</span> </a> </nav><!-- .storefront-product-pagination --> </div> </main><!-- #main --> </div><!-- #primary --> <div id="secondary" class="widget-area" role="complementary"> <div id="block-32" class="widget widget_block widget_text"><p class="has-luminous-vivid-orange-color has-text-color"><strong>POPULAR SERVICES</strong></p></div><div id="block-33" class="widget widget_block widget_text"><p class="has-vivid-purple-color has-text-color"><a href="https://codeshive.com/order-now/">C programming assignment help</a><br><a href="https://codeshive.com/order-now/">Computer networking assignment help</a><br><a href="https://codeshive.com/order-now/">Computer science homework help</a><br><a href="https://codeshive.com/order-now/">Database management homework help</a><br><a href="https://codeshive.com/order-now/">Java programming help</a><br><a href="https://codeshive.com/order-now/">Matlab assignment help</a><br><a href="https://codeshive.com/order-now/">Php assignment help</a><br><a href="https://codeshive.com/order-now/">Python programming assignment help</a><br><a href="https://codeshive.com/order-now/">SQL assignment help</a><br><a href="https://codeshive.com/order-now/">Html homework help</a></p></div><div id="block-34" class="widget widget_block widget_text"><p>The Codes Hive believes in helping students to write clean codes that are simple to read and easy to execute.Based in New York, United States, we provide assignment help, homework help, online tutoring and project help in programming to the students and professionals across the globe.</p></div><div id="block-21" class="widget widget_block widget_text"><p>Disclaimer<strong>:</strong> The reference papers/tutorials provided are to be considered as model papers only and are not to submitted as it is. These papers are intended to be used for research and reference purposes only.</p></div><div id="search-2" class="widget widget_search"><form role="search" method="get" class="search-form" action="https://codeshive.com/"> <label> <span class="screen-reader-text">Search for:</span> <input type="search" class="search-field" placeholder="Search …" value="" name="s" /> </label> <input type="submit" class="search-submit" value="Search" /> </form></div><div id="text-3" class="widget widget_text"><span class="gamma widget-title">Why You Should Hire Codeshive Tutors</span> <div class="textwidget"><ul> <li><span class="grade"><img decoding="async" title="" src="https://homeworkdoer.org/images/icon-grade.gif" alt="" /></span>Guaranteed A or B Grade</li> <li><span class="money-back"><img decoding="async" title="" src="https://homeworkdoer.org/images/icon-money-back.gif" alt="" /></span>Money back guarantee</li> <li><span class="save-time"><img decoding="async" title="" src="https://homeworkdoer.org/images/icon-save-time.gif" alt="" /></span>Save Time</li> <li><span class="moreless-time"><img decoding="async" title="" src="https://homeworkdoer.org/images/icon-moreless-time.gif" alt="" /></span>Achieve more in less time</li> <li><span class="support"><img decoding="async" title="" src="https://homeworkdoer.org/images/icon-support2.gif" alt="" /></span>24/7 Customer support</li> </ul> </div> </div></div><!-- #secondary --> </div><!-- .col-full --> </div><!-- #content --> <footer id="colophon" class="site-footer" role="contentinfo"> <div class="col-full"> <div class="footer-widgets row-1 col-3 fix"> <div class="block footer-widget-1"> <div id="block-29" class="widget widget_block"><div itemprop="location" itemscope itemtype="http://schema.org/Organization" class="wp-block-jetpack-contact-info"><div class="wp-block-jetpack-email">Email <a itemprop="email" href="mailto:codeshive21@gmail.com">codeshive21@gmail.com</a></div> <div class="wp-block-jetpack-phone"><span class="phone-prefix">Tel </span><span itemprop="telephone"><a href="tel:+15414237793">+1 541-423-7793</a></span></div> <div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress" class="wp-block-jetpack-address" ><div itemprop="streetAddress" class="jetpack-address__address jetpack-address__address1">New York</div><div itemprop="addressCountry" class="jetpack-address__country">United States</div></div></div></div> </div> <div class="block footer-widget-2"> <div id="block-23" class="widget widget_block widget_media_image"><figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="521" height="96" src="https://codeshive.com/wp-content/uploads/2021/08/images-1.jpg" alt="" class="wp-image-15965" srcset="https://codeshive.com/wp-content/uploads/2021/08/images-1.jpg 521w, https://codeshive.com/wp-content/uploads/2021/08/images-1-300x55.jpg 300w, https://codeshive.com/wp-content/uploads/2021/08/images-1-416x77.jpg 416w" sizes="(max-width: 521px) 100vw, 521px" /><figcaption>All Payments are secured</figcaption></figure></div> </div> <div class="block footer-widget-3"> <div id="block-43" class="widget widget_block"><div class="wp-block-ub-social-share" id="ub-social-share-8bccb7ab-4558-4dcf-884b-612bb67c5392"> <div class="social-share-icons align-icons-left orientation-icons-row"><a aria-label="facebook-logo" target="_blank" rel="nofollow" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fcodeshive.com%2Fproduct%2Fhomework-2-bulletin-board-system-part-2-solved%2F&title=Homework%202%20%26%238211%3B%20Bulletin%20Board%20System%3A%20Part%202%20solved" class="ub-social-share-facebook-container"> <span class="social-share-icon ub-social-share-facebook"><svg xmlns="http://www.w3.org/2000/svg" style="fill:#1877f2" fill="#1877f2" width="20" height="20" viewBox="0 0 264 512"><path d="M76.7 512V283H0v-91h76.7v-71.7C76.7 42.4 124.3 0 193.8 0c33.3 0 61.9 2.5 70.2 3.6V85h-48.2c-37.8 0-45.1 18-45.1 44.3V192H256l-11.7 91h-73.6v229" /></svg></span><span>share</span></a><a aria-label="twitter-logo" target="_blank" rel="nofollow" href="http://twitter.com/intent/tweet?url=https%3A%2F%2Fcodeshive.com%2Fproduct%2Fhomework-2-bulletin-board-system-part-2-solved%2F&text=Homework%202%20%26%238211%3B%20Bulletin%20Board%20System%3A%20Part%202%20solved" class="ub-social-share-twitter-container"> <span class="social-share-icon ub-social-share-twitter"><svg xmlns="http://www.w3.org/2000/svg" style="color:#1d9BF0" fill="#1d9BF0" width="20" height="20" viewBox="0 0 24 24"><path d="M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584l-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z" /></svg></span><span>tweet</span></a><a aria-label="linkedin-logo" target="_blank" rel="nofollow" href="https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcodeshive.com%2Fproduct%2Fhomework-2-bulletin-board-system-part-2-solved%2F" class="ub-social-share-linkedin-container"> <span class="social-share-icon ub-social-share-linkedin"><svg xmlns="http://www.w3.org/2000/svg" style="fill:#2867b2" fill="#2867b2" width="20" height="20" viewBox="0 0 448 512"><path d="M100.3 480H7.4V180.9h92.9V480zM53.8 140.1C24.1 140.1 0 115.5 0 85.8 0 56.1 24.1 32 53.8 32c29.7 0 53.8 24.1 53.8 53.8 0 29.7-24.1 54.3-53.8 54.3zM448 480h-92.7V334.4c0-34.7-.7-79.2-48.3-79.2-48.3 0-55.7 37.7-55.7 76.7V480h-92.8V180.9h89.1v40.8h1.3c12.4-23.5 42.7-48.3 87.9-48.3 94 0 111.3 61.9 111.3 142.3V480z" /></svg></span><span>share</span></a><a aria-label="pinterest-logo" target="_blank" rel="nofollow" href="https://pinterest.com/pin/create/button/?&url=https%3A%2F%2Fcodeshive.com%2Fproduct%2Fhomework-2-bulletin-board-system-part-2-solved%2F&description=Homework%202%20%26%238211%3B%20Bulletin%20Board%20System%3A%20Part%202%20solved&media=https://codeshive.com/wp-content/uploads/2021/01/download-8.jpg" class="ub-social-share-pinterest-container"> <span class="social-share-icon ub-social-share-pinterest"><svg xmlns="http://www.w3.org/2000/svg" style="fill:#e60023" fill="#e60023" width="20" height="20" viewBox="0 0 384 512"><path d="M204 6.5C101.4 6.5 0 74.9 0 185.6 0 256 39.6 296 63.6 296c9.9 0 15.6-27.6 15.6-35.4 0-9.3-23.7-29.1-23.7-67.8 0-80.4 61.2-137.4 140.4-137.4 68.1 0 118.5 38.7 118.5 109.8 0 53.1-21.3 152.7-90.3 152.7-24.9 0-46.2-18-46.2-43.8 0-37.8 26.4-74.4 26.4-113.4 0-66.2-93.9-54.2-93.9 25.8 0 16.8 2.1 35.4 9.6 50.7-13.8 59.4-42 147.9-42 209.1 0 18.9 2.7 37.5 4.5 56.4 3.4 3.8 1.7 3.4 6.9 1.5 50.4-69 48.6-82.5 71.4-172.8 12.3 23.4 44.1 36 69.3 36 106.2 0 153.9-103.5 153.9-196.8C384 71.3 298.2 6.5 204 6.5z" /></svg></span><span>pin</span></a><a aria-label="reddit-logo" target="_blank" rel="nofollow" href="http://www.reddit.com/submit?url=https%3A%2F%2Fcodeshive.com%2Fproduct%2Fhomework-2-bulletin-board-system-part-2-solved%2F&title=Homework%202%20%26%238211%3B%20Bulletin%20Board%20System%3A%20Part%202%20solved" class="ub-social-share-reddit-container"> <span class="social-share-icon ub-social-share-reddit"><svg xmlns="http://www.w3.org/2000/svg" style="fill:#ff4500" fill="#ff4500" width="20" height="20" viewBox="0 0 512 512"><path d="M440.3 203.5c-15 0-28.2 6.2-37.9 15.9-35.7-24.7-83.8-40.6-137.1-42.3L293 52.3l88.2 19.8c0 21.6 17.6 39.2 39.2 39.2 22 0 39.7-18.1 39.7-39.7s-17.6-39.7-39.7-39.7c-15.4 0-28.7 9.3-35.3 22l-97.4-21.6c-4.9-1.3-9.7 2.2-11 7.1L246.3 177c-52.9 2.2-100.5 18.1-136.3 42.8-9.7-10.1-23.4-16.3-38.4-16.3-55.6 0-73.8 74.6-22.9 100.1-1.8 7.9-2.6 16.3-2.6 24.7 0 83.8 94.4 151.7 210.3 151.7 116.4 0 210.8-67.9 210.8-151.7 0-8.4-.9-17.2-3.1-25.1 49.9-25.6 31.5-99.7-23.8-99.7zM129.4 308.9c0-22 17.6-39.7 39.7-39.7 21.6 0 39.2 17.6 39.2 39.7 0 21.6-17.6 39.2-39.2 39.2-22 .1-39.7-17.6-39.7-39.2zm214.3 93.5c-36.4 36.4-139.1 36.4-175.5 0-4-3.5-4-9.7 0-13.7 3.5-3.5 9.7-3.5 13.2 0 27.8 28.5 120 29 149 0 3.5-3.5 9.7-3.5 13.2 0 4.1 4 4.1 10.2.1 13.7zm-.8-54.2c-21.6 0-39.2-17.6-39.2-39.2 0-22 17.6-39.7 39.2-39.7 22 0 39.7 17.6 39.7 39.7-.1 21.5-17.7 39.2-39.7 39.2z" /></svg></span><span>post</span></a><a aria-label="tumblr-logo" target="_blank" rel="nofollow" href="https://www.tumblr.com/widgets/share/tool?canonicalUrl=https%3A%2F%2Fcodeshive.com%2Fproduct%2Fhomework-2-bulletin-board-system-part-2-solved%2F&title=Homework%202%20%26%238211%3B%20Bulletin%20Board%20System%3A%20Part%202%20solved" class="ub-social-share-tumblr-container"> <span class="social-share-icon ub-social-share-tumblr"><svg xmlns="http://www.w3.org/2000/svg" style="fill:#001935" fill="#001935" width="20" height="20" viewBox="0 0 320 512"><path d="M309.8 480.3c-13.6 14.5-50 31.7-97.4 31.7-120.8 0-147-88.8-147-140.6v-144H17.9c-5.5 0-10-4.5-10-10v-68c0-7.2 4.5-13.6 11.3-16 62-21.8 81.5-76 84.3-117.1.8-11 6.5-16.3 16.1-16.3h70.9c5.5 0 10 4.5 10 10v115.2h83c5.5 0 10 4.4 10 9.9v81.7c0 5.5-4.5 10-10 10h-83.4V360c0 34.2 23.7 53.6 68 35.8 4.8-1.9 9-3.2 12.7-2.2 3.5.9 5.8 3.4 7.4 7.9l22 64.3c1.8 5 3.3 10.6-.4 14.5z" /></svg></span><span>share</span></a></div> </div></div> </div> </div><!-- .footer-widgets.row-1 --> <div class="site-info"> © Codeshive 2024 <br /> <a class="privacy-policy-link" href="https://codeshive.com/privacy-policy/" rel="privacy-policy">Privacy Policy</a><span role="separator" aria-hidden="true"></span><a href="https://woocommerce.com" target="_blank" title="WooCommerce - The Best eCommerce Platform for WordPress" rel="noreferrer">Built with Storefront & WooCommerce</a>. </div><!-- .site-info --> <div class="storefront-handheld-footer-bar"> <ul class="columns-3"> <li class="my-account"> <a href="https://codeshive.com/my-account/">My Account</a> </li> <li class="search"> <a href="">Search</a> <div class="site-search"> <div class="widget woocommerce widget_product_search"><form role="search" method="get" class="woocommerce-product-search" action="https://codeshive.com/"> <label class="screen-reader-text" for="woocommerce-product-search-field-1">Search for:</label> <input type="search" id="woocommerce-product-search-field-1" class="search-field" placeholder="Search products…" value="" name="s" /> <button type="submit" value="Search" class="">Search</button> <input type="hidden" name="post_type" value="product" /> </form> </div> </div> </li> <li class="cart"> <a class="footer-cart-contents" href="https://codeshive.com/cart/">Cart <span class="count">0</span> </a> </li> </ul> </div> </div><!-- .col-full --> </footer><!-- #colophon --> <section class="storefront-sticky-add-to-cart"> <div class="col-full"> <div class="storefront-sticky-add-to-cart__content"> <img width="225" height="225" src="https://codeshive.com/wp-content/uploads/2021/01/download-8.jpg" class="attachment-woocommerce_thumbnail size-woocommerce_thumbnail" alt="" loading="lazy" /> <div class="storefront-sticky-add-to-cart__content-product-info"> <span class="storefront-sticky-add-to-cart__content-title">You're viewing: <strong>Homework 2 – Bulletin Board System: Part 2 solved</strong></span> <span class="storefront-sticky-add-to-cart__content-price"><span class="woocommerce-Price-amount amount"><span class="woocommerce-Price-currencySymbol">$</span>40.00</span></span> </div> <a href="?add-to-cart=12765" class="storefront-sticky-add-to-cart__content-button button alt" rel="nofollow"> View This Answer </a> </div> </div> </section><!-- .storefront-sticky-add-to-cart --> </div><!-- #page --> <script type="application/ld+json">{"@context":"https:\/\/schema.org\/","@graph":[{"@context":"https:\/\/schema.org\/","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"name":"Home","@id":"https:\/\/codeshive.com"}},{"@type":"ListItem","position":2,"item":{"name":"Intro. to Network Programming","@id":"https:\/\/codeshive.com\/product-category\/intro-to-network-programming\/"}},{"@type":"ListItem","position":3,"item":{"name":"Homework 2 &#8211; Bulletin Board System: Part 2 solved","@id":"https:\/\/codeshive.com\/product\/homework-2-bulletin-board-system-part-2-solved\/"}}]},{"@context":"https:\/\/schema.org\/","@type":"Product","@id":"https:\/\/codeshive.com\/product\/homework-2-bulletin-board-system-part-2-solved\/#product","name":"Homework 2 - Bulletin Board System: Part 2 solved","url":"https:\/\/codeshive.com\/product\/homework-2-bulletin-board-system-part-2-solved\/","description":"Intro. to Network Programming\r\nDescription\r\nContinuing the first part, you are asking to implement the functions of the Bulletin Board System (BBS) server.\r\nRequirement\r\nThe service accepts the following commands and at least 10 clients:\r\nWhen client enter command incompletely E.g., missing parameters, the server should show command format for client.\r\nCommand format Description Result\r\ncreate-board Create a board which named .\r\n must be unique.\r\nIf Board's name is already used, show failed\r\nmessage, otherwise it is success.\r\nMust be logged in when creating board\u2019s\r\nname\r\nSuccess Create board successfully.\r\nFail (1) Board already exist.\r\nFail (2) Please login first.\r\ncreate-post --title \r\n--content \r\n(command is in the same line )\r\nCreate a post which title is and content\r\nis .\r\nUse --title and --content to separate titles and\r\ncontent.\r\n can have space but only in one line.\r\n can have space, and key in to\r\nindicate a new line.\r\nSuccess Create post successfully.\r\nFail (1) Board does not exist.\r\nFail (2) Please login first.\r\nlist-board ## List all boards in BBS.\r\n is a keyword, use ## to do\r\nadvanced query.\r\nIndex Name Moderator\r\n \r\nlist-post ## List all posts in a board named \r\n is a keyword, use ## to do\r\nadvanced query.\r\nSuccess\r\nID Title Author Date\r\n \r\nFail Board does not exist.\r\nread Show the post which ID is . Success Author :\r\nTitle :\r\nDate :\r\n--\r\n\r\n--\r\n : \r\nFail Post does not exist.\r\ndelete-post Delete the post which ID is .\r\nOnly the post owner can delete the post.\r\nIf the user is not the post owner, show failed\r\nmessage, otherwise it is success.\r\nSuccess Delete successfully.\r\nFail (1) Please login first.\r\nFail (2) Post does not exist.\r\nFail (3) Not the post owner.\r\nupdate-post --title\/content\r\n\r\nUpdate the post which ID is .\r\nUse -- to decide which to modify, title or\r\ncontent, and replaced by .\r\nOnly the post owner can update the post.\r\nIf the user is not the post owner, show failed\r\nmessage, otherwise it is success.\r\nSuccess Update successfully.\r\nFail (1) Please login first.\r\nFail (2) Post does not exist.\r\nFail (3) Not the post owner.\r\ncomment Leave a comment < comment > at the post\r\nwhich ID is \r\nSuccess Comment successfully.\r\nFail (1) Please login first.\r\nFail (2) Post does not exist.\r\nexit Close connection.\r\nScenario\r\nbash$ telnet 127.0.0.1 7890\r\n********************************\r\n** Welcome to the BBS server. **\r\n% create-board NP_HW\r\nPlease login first.\r\n% register Bob bob@qwer.asdf 123456\r\nRegister successfully.\r\n% register Sam sam@qwer.com 654321\r\nRegister successfully.\r\n% login Bob 123456\r\nWelcome, Bob.\r\n% create-board NP_HW\r\nCreate board successfully.\r\n% create-board NP_HW\r\nBoard already exist.\r\n% create-board OS_HW\r\nCreate board successfully.\r\n% create-board FF\r\nCreate board successfully.\r\n% list-board\r\nIndex Name Moderator\r\n1 NP_HW Bob\r\n2 OS_HW Bob\r\n3 FF_HW Bob\r\n% list-board ##HW\r\nIndex Name Moderator\r\n1 NP_HW Bob\r\n2 OS_HW Bob \r\n% create-post NCTU --title About NP HW_2 --content Help!I have some problem!\r\nBoard does not exist.\r\n% create-post NP_HW --title About NP HW_2 --content Help!I have some problem!\r\nCreate post successfully.\r\n% create-post NP_HW --title HW_3 --content Ask!Is NP HW_3 Released?\r\nCreate post successfully.\r\n% list-post NP\r\nBoard does not exist.\r\n% list-post NP_HW\r\n% list-post NP_HW ##HW_2\r\n\r\n% read 888\r\nPost does not exist.\r\n% read 1\r\n Author :Bob\r\n Title :About NP HW_2\r\n Date :2020-03-31\r\n--\r\nHelp!\r\nI have some problem!\r\n--\r\n% update-post 888 --title NP HW_2\r\nPost does not exist.\r\n% update-post 1 --title NP HW_2\r\nUpdate successfully.\r\n% read 1\r\n Author :Bob\r\n Title :NP HW_2\r\n Date :2020-03-31\r\n--\r\nHelp!\r\nI have some problem!\r\n--\r\n% logout\r\nBye, Bob.\r\n% login Sam 654321\r\nWelcome, Sam.\r\n% update-post 1 --content Ha!ha!ha!\r\nNot the post owner.\r\n% delete-post 1\r\nNot the post owner.\r\n% comment 888 Ha! ha! ha!\r\nPost does not exist.\r\n% comment 1 Ha! ha! ha!\r\nComment successfully.\r\n% read 1\r\n Author :Bob\r\n Title :NP HW_2\r\n Date :2020-03-31\r\n--\r\nHelp!\r\nI have some problem!\r\n--\r\nSam: Ha! ha! ha!\r\n% create-board Hello\r\nCreate board successfully.\r\n% list-board\r\nIndex Name Moderator\r\n1 NP_HW Bob\r\n2 OS_HW Bob\r\n3 FF_HW Bob\r\n4 Hello Sam\r\n% logout\r\nBye, Sam.\r\n% login Bob 123456\r\nWelcome, Bob.\r\n% delete-post 1\r\nDelete successfully.\r\n% read 1\r\nPost does not exist.\r\n% logout\r\nBye, Bob.\r\n% exit\r\nGrade (100%)\r\n\u26ab create-board command. - (10%)\r\n\u26ab create-post command. - (20%)\r\n\u26ab list-board command. - (15%)\r\n\u26ab list-post command. - (15%)\r\n\u26ab read command. - (10%)\r\n\u26ab delete-post command. - (10%)\r\n\u26ab update-post command. - (10%)\r\n\u26ab comment command. - (10%)\r\nSubmission\r\nPlease upload a zip file called \u201chw2_{$student_id}.zip\u201d that includes your source code. Submission that don\u2019t follow the rule\r\nwill get 20% punishment on the grade.\r\nYou will get 0 points on this project for plagiarism. Please don\u2019t copy-paste any code!\r\nNote\r\n You will be asked to use AWS resources in projects 3 and 4, so we suggest you use AWS SDK supported languages to\r\nimplement this project.\r\nReference\r\n1. C\/C++ Socket\r\n2. SQLite C\/C++ Interface\r\n3. Linux socket SELECT\r\n4. AWS SDK supported languages","image":"https:\/\/codeshive.com\/wp-content\/uploads\/2021\/01\/download-8.jpg","sku":12765,"offers":[{"@type":"Offer","price":"40.00","priceValidUntil":"2025-12-31","priceSpecification":{"price":"40.00","priceCurrency":"USD","valueAddedTaxIncluded":"false"},"priceCurrency":"USD","availability":"http:\/\/schema.org\/InStock","url":"https:\/\/codeshive.com\/product\/homework-2-bulletin-board-system-part-2-solved\/","seller":{"@type":"Organization","name":"Codeshive","url":"https:\/\/codeshive.com"}}]}]}</script> <div class="pswp" tabindex="-1" role="dialog" aria-hidden="true"> <div class="pswp__bg"></div> <div class="pswp__scroll-wrap"> <div class="pswp__container"> <div class="pswp__item"></div> <div class="pswp__item"></div> <div class="pswp__item"></div> </div> <div class="pswp__ui pswp__ui--hidden"> <div class="pswp__top-bar"> <div class="pswp__counter"></div> <button class="pswp__button pswp__button--close" aria-label="Close (Esc)"></button> <button class="pswp__button pswp__button--share" aria-label="Share"></button> <button class="pswp__button pswp__button--fs" aria-label="Toggle fullscreen"></button> <button class="pswp__button pswp__button--zoom" aria-label="Zoom in/out"></button> <div class="pswp__preloader"> <div class="pswp__preloader__icn"> <div class="pswp__preloader__cut"> <div class="pswp__preloader__donut"></div> </div> </div> </div> </div> <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap"> <div class="pswp__share-tooltip"></div> </div> <button class="pswp__button pswp__button--arrow--left" aria-label="Previous (arrow left)"></button> <button class="pswp__button pswp__button--arrow--right" aria-label="Next (arrow right)"></button> <div class="pswp__caption"> <div class="pswp__caption__center"></div> </div> </div> </div> </div> <script> (function () { var c = document.body.className; c = c.replace(/woocommerce-no-js/, 'woocommerce-js'); document.body.className = c; })(); </script> <link rel='stylesheet' id='wc-blocks-style-css' href='https://codeshive.com/wp-content/plugins/woocommerce/assets/client/blocks/wc-blocks.css?ver=wc-9.2.3' media='all' /> <style id='jetpack-block-contact-info-inline-css'> .wp-block-jetpack-contact-info{margin-bottom:1.5em} </style> <script src="https://codeshive.com/wp-includes/js/dist/hooks.min.js?ver=2810c76e705dd1a53b18" id="wp-hooks-js"></script> <script src="https://codeshive.com/wp-includes/js/dist/i18n.min.js?ver=5e580eb46a90c2b997e6" id="wp-i18n-js"></script> <script id="wp-i18n-js-after"> wp.i18n.setLocaleData( { 'text direction\u0004ltr': [ 'ltr' ] } ); </script> <script src="https://codeshive.com/wp-content/plugins/contact-form-7/includes/swv/js/index.js?ver=5.9.8" id="swv-js"></script> <script id="contact-form-7-js-extra"> var wpcf7 = {"api":{"root":"https:\/\/codeshive.com\/wp-json\/","namespace":"contact-form-7\/v1"},"cached":"1"}; </script> <script src="https://codeshive.com/wp-content/plugins/contact-form-7/includes/js/index.js?ver=5.9.8" id="contact-form-7-js"></script> <script id="kk-star-ratings-js-extra"> var kk_star_ratings = {"action":"kk-star-ratings","endpoint":"https:\/\/codeshive.com\/wp-admin\/admin-ajax.php","nonce":"547622f134"}; </script> <script src="https://codeshive.com/wp-content/plugins/kk-star-ratings/src/core/public/js/kk-star-ratings.min.js?ver=5.4.8" id="kk-star-ratings-js"></script> <script src="https://codeshive.com/wp-content/plugins/pinterest-pin-it-button-on-image-hover-and-post/js/main.js?ver=6.6.1" id="wl-pin-main-js"></script> <script id="wl-pin-main-js-after"> jQuery(document).ready(function(){jQuery(".is-cropped img").each(function(){jQuery(this).attr("style", "min-height: 120px;min-width: 100px;");});jQuery(".avatar").attr("style", "min-width: unset; min-height: unset;");}); </script> <script id="awdr-main-js-extra"> var awdr_params = {"ajaxurl":"https:\/\/codeshive.com\/wp-admin\/admin-ajax.php","nonce":"156ca866db","enable_update_price_with_qty":"show_when_matched","refresh_order_review":"0","custom_target_simple_product":"","custom_target_variable_product":"","js_init_trigger":"","awdr_opacity_to_bulk_table":"","awdr_dynamic_bulk_table_status":"0","awdr_dynamic_bulk_table_off":"on","custom_simple_product_id_selector":"","custom_variable_product_id_selector":""}; </script> <script src="https://codeshive.com/wp-content/plugins/woo-discount-rules/v2/Assets/Js/site_main.js?ver=2.6.5" id="awdr-main-js"></script> <script src="https://codeshive.com/wp-content/plugins/woo-discount-rules/v2/Assets/Js/awdr-dynamic-price.js?ver=2.6.5" id="awdr-dynamic-price-js"></script> <script id="wp-statistics-tracker-js-extra"> var WP_Statistics_Tracker_Object = {"requestUrl":"https:\/\/codeshive.com\/wp-json\/wp-statistics\/v2","ajaxUrl":"https:\/\/codeshive.com\/wp-admin\/admin-ajax.php","hitParams":{"wp_statistics_hit":1,"source_type":"product","source_id":12765,"search_query":"","signature":"504c5d1f82b00d425575f10f1985c644","endpoint":"hit"},"onlineParams":{"wp_statistics_hit":1,"source_type":"product","source_id":12765,"search_query":"","signature":"504c5d1f82b00d425575f10f1985c644","endpoint":"online"},"option":{"userOnline":"1","consentLevel":"","dntEnabled":"1","bypassAdBlockers":"","isWpConsentApiActive":false,"trackAnonymously":false,"isPreview":false},"jsCheckTime":"60000"}; </script> <script src="https://codeshive.com/wp-content/plugins/wp-statistics/assets/js/tracker.js?ver=14.10" id="wp-statistics-tracker-js"></script> <script id="storefront-navigation-js-extra"> var storefrontScreenReaderText = {"expand":"Expand child menu","collapse":"Collapse child menu"}; </script> <script src="https://codeshive.com/wp-content/themes/storefront/assets/js/navigation.min.js?ver=4.2.0" id="storefront-navigation-js"></script> <script src="https://codeshive.com/wp-content/plugins/woocommerce/assets/js/sourcebuster/sourcebuster.min.js?ver=9.2.3" id="sourcebuster-js-js"></script> <script id="wc-order-attribution-js-extra"> var wc_order_attribution = {"params":{"lifetime":1.0e-5,"session":30,"base64":false,"ajaxurl":"https:\/\/codeshive.com\/wp-admin\/admin-ajax.php","prefix":"wc_order_attribution_","allowTracking":true},"fields":{"source_type":"current.typ","referrer":"current_add.rf","utm_campaign":"current.cmp","utm_source":"current.src","utm_medium":"current.mdm","utm_content":"current.cnt","utm_id":"current.id","utm_term":"current.trm","utm_source_platform":"current.plt","utm_creative_format":"current.fmt","utm_marketing_tactic":"current.tct","session_entry":"current_add.ep","session_start_time":"current_add.fd","session_pages":"session.pgs","session_count":"udata.vst","user_agent":"udata.uag"}}; </script> <script src="https://codeshive.com/wp-content/plugins/woocommerce/assets/js/frontend/order-attribution.min.js?ver=9.2.3" id="wc-order-attribution-js"></script> <script src="https://codeshive.com/wp-content/themes/storefront/assets/js/woocommerce/header-cart.min.js?ver=4.2.0" id="storefront-header-cart-js"></script> <script src="https://codeshive.com/wp-content/themes/storefront/assets/js/footer.min.js?ver=4.2.0" id="storefront-handheld-footer-bar-js"></script> <script src="https://codeshive.com/wp-content/plugins/easy-remove-footer-credit/script.js?ver=6.6.1" id="jaberfc_script-js"></script> <script src="https://stats.wp.com/e-202436.js" id="jetpack-stats-js" data-wp-strategy="defer"></script> <script id="jetpack-stats-js-after"> _stq = window._stq || []; _stq.push([ "view", JSON.parse("{\"v\":\"ext\",\"blog\":\"188646962\",\"post\":\"12765\",\"tz\":\"0\",\"srv\":\"codeshive.com\",\"j\":\"1:13.8\"}") ]); _stq.push([ "clickTrackerInit", "188646962", "12765" ]); </script> <script id="wc-cart-fragments-js-extra"> var wc_cart_fragments_params = {"ajax_url":"\/wp-admin\/admin-ajax.php","wc_ajax_url":"\/?wc-ajax=%%endpoint%%","cart_hash_key":"wc_cart_hash_d3b9954c221eecec8f775f707ac06f5d","fragment_name":"wc_fragments_d3b9954c221eecec8f775f707ac06f5d","request_timeout":"5000"}; </script> <script src="https://codeshive.com/wp-content/plugins/woocommerce/assets/js/frontend/cart-fragments.min.js?ver=9.2.3" id="wc-cart-fragments-js" defer data-wp-strategy="defer"></script> <script src="https://codeshive.com/wp-includes/js/dist/vendor/wp-polyfill.min.js?ver=3.15.0" id="wp-polyfill-js"></script> <script id="jetpack-blocks-assets-base-url-js-before"> var Jetpack_Block_Assets_Base_Url="https://codeshive.com/wp-content/plugins/jetpack/_inc/blocks/"; </script> <script src="https://codeshive.com/wp-content/plugins/jetpack/_inc/blocks/contact-info/view.js?minify=false&ver=13.8" id="jetpack-block-contact-info-js"></script> <script id="storefront-sticky-add-to-cart-js-extra"> var storefront_sticky_add_to_cart_params = {"trigger_class":"entry-summary"}; </script> <script src="https://codeshive.com/wp-content/themes/storefront/assets/js/sticky-add-to-cart.min.js?ver=4.2.0" id="storefront-sticky-add-to-cart-js"></script> <!-- WooCommerce JavaScript --> <script type="text/javascript"> jQuery(function($) { _wca.push({'_en': 'woocommerceanalytics_product_view','blog_id': '188646962', 'ui': 'null', 'url': 'https://codeshive.com', 'woo_version': '9.2.3', 'store_admin': '0', 'device': 'desktop', 'template_used': '0', 'additional_blocks_on_cart_page': [],'additional_blocks_on_checkout_page': [],'store_currency': 'USD', 'cart_page_contains_cart_block': '0', 'cart_page_contains_cart_shortcode': '1', 'checkout_page_contains_checkout_block': '0', 'checkout_page_contains_checkout_shortcode': '1', 'pi': '12765', 'pn': 'Homework 2 - Bulletin Board System: Part 2 solved', 'pc': 'Intro. to Network Programming', 'pp': '40', 'pt': 'simple', }); }); </script> </body> </html> <!-- Page cached by LiteSpeed Cache 6.5.0.2 on 2024-09-07 23:32:13 -->